I have data from a survey experiment in which respondents were randomly assigned to one of four groups:
> summary(df$Group)
Control Treatment1 Treatment2 Treatment3
59 63 62 66
While the three treatment groups do vary slightly in the stimulus applied, the main distinction that I care about is between the control and treatment groups. So I defined a dummy variable Control
:
> summary(df$Control)
TRUE FALSE
59 191
In the survey, respondents were asked (among other things) to choose which of two things they preferred:
> summary(df$Prefer)
A B NA's
152 93 5
Then, after receiving some stimulus as determined by their treatment group (and none if they were in the control group), respondents were asked to choose between the same two things:
> summary(df$Choice)
A B
149 101
I want to know if the being in one of the three treatment groups had an effect on the choice that respondents made in this last question. My hypothesis is that respondents who received a treatment are more likely to choose A
than B
.
Given that I am working with categorical data, I have decided to use a logit regression (feel free to chime in if you think that's incorrect). Since respondents were randomly assigned, I am under the impression that I shouldn't necessarily need to control for other variables (e.g. demographics), so I have left those out for this question. My first model was simply the following:
> x0 <- glm(Product ~ Control + Prefer, data=df, family=binomial(link="logit"))
> summary(x0)
Call:
glm(formula = Choice ~ Control + Prefer, family = binomial(link = "logit"),
data = df)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.8366 -0.5850 -0.5850 0.7663 1.9235
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.4819 0.3829 3.871 0.000109 ***
ControlFALSE -0.4068 0.3760 -1.082 0.279224
PreferA -2.7538 0.3269 -8.424 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 328.95 on 244 degrees of freedom
Residual deviance: 239.69 on 242 degrees of freedom
(5 observations deleted due to missingness)
AIC: 245.69
Number of Fisher Scoring iterations: 4
I am under the impression that the intercept being statistically significant is not something that holds interpretable meaning. I thought perhaps that I should include an interaction term as follows:
> x1 <- glm(Choice ~ Control + Prefer + Control:Prefer, data=df, family=binomial(link="logit"))
> summary(x1)
Call:
glm(formula = Product ~ Control + Prefer + Control:Prefer, family = binomial(link = "logit"),
data = df)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.5211 -0.6424 -0.5003 0.8519 2.0688
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.135 1.021 3.070 0.00214 **
ControlFALSE -2.309 1.054 -2.190 0.02853 *
PreferA -5.150 1.152 -4.472 7.75e-06 ***
ControlFALSE:PreferA 2.850 1.204 2.367 0.01795 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 328.95 on 244 degrees of freedom
Residual deviance: 231.27 on 241 degrees of freedom
(5 observations deleted due to missingness)
AIC: 239.27
Number of Fisher Scoring iterations: 5
Now the respondents status as in a treatment group has the expected effect. Was this a valid set of steps? How can I interpret the interaction term ControlFALSE:PreferA
? Are the other coefficients still the log odds?