You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the impact threshhold is greater than the impacts of the `Z`s (the other covariates) then an omitted variable would have to have a greater impact than any of the observed covariates to change the inference. Note that in fields in which there is a lot known about covariates given the outcome of interest, then the omitted covariates are likely less important than those that are known and included.
126
+
If the impact threshhold is greater than the impacts of the `Z`s (the other covariates) then an omitted variable would have to have a greater impact than any of the observed covariates to change the inference.
126
127
127
-
**For logistic regression models fit with glm()**
128
-
129
-
Effects for logistic models are typically interpreted on the basis of average partial (or marginal) effects (calculated using the `margins` package).
128
+
**For logistic regression models fit with glm() with a dichotomous predictor of interest**
130
129
131
-
Due to an issue with the margins and predictions package, these are the raw coefficients, not the average marginal effects; we will address this in future patches.
130
+
We first fit a logistic regression model where the predictor of interest (`condition`) is binary/dichotomous.
132
131
133
-
```{r, message = F}
134
-
# if forcats is not installed, this install it first using install.packages("forcats") for this to run
135
-
if (requireNamespace("forcats")) {
136
-
d <- forcats::gss_cat
137
-
138
-
d$married <- ifelse(d$marital == "Married", 1, 0)
139
-
140
-
m2 <- glm(married ~ age, data = d, family = binomial(link = "logit"))
141
-
konfound(m2, age)
142
-
}
132
+
```{r}
133
+
# View summary stats for condition variable
134
+
table(binary_dummy_data$condition)
135
+
# Fit the logistic regression model
136
+
m4 <- glm(outcome ~ condition + control,
137
+
data = binary_dummy_data, family = binomial)
138
+
# View the summary of the model
139
+
summary(m4)
143
140
```
144
141
145
-
**For logistic regression models fit with glm() with a dichotomous predictor of interest**
146
-
147
-
```{r, eval = FALSE}
148
-
m4 <- glm(outcome ~ condition, data = binary_dummy_data)
149
-
konfound(m4, condition, two_by_two = TRUE)
142
+
Now we call konfound as below, where `n_treat` represents number of data points in the treatment condition.
143
+
```{r}
144
+
konfound(model_object = m4,
145
+
tested_variable = condition,
146
+
two_by_two = TRUE, n_treat = 55)
150
147
```
151
148
152
149
**Mixed effects (or multi-level) models fit with the lmer() function from the lme4 package**
@@ -165,7 +162,7 @@ if (requireNamespace("lme4")) {
165
162
166
163
## Use of mkonfound() for meta-analyses that include sensitivity analysis
167
164
168
-
`mkonfound()` supports sensitivity that can be compared or synthesized across multiple analyses. For example, here, `d` represents output from a number (30 in this case) of past studies, read in a CSV file from a website:
165
+
`mkonfound()` supports sensitivity that can be compared or synthesized across multiple analyses. Calculations are based on the RIR framework using correlations to express effects and thresholds in each study. For example, here, `d` represents output from a number (30 in this case) of past studies, read in a CSV file from a website:
0 commit comments