0
$\begingroup$

I am looking for advice on how to analyze some experimental data.

My DV is a binary response variable - yes or no (coded as 1 and 0).

Usually when I run experiments I fully cross all conditions and use ANOVA (with a continuous DV). However, this time I did not fully cross. Basically, there are 6 conditions and each condition adds an element to the previous condition.

More specifically, I am looking at participants' beliefs regarding company responsibility in specific circumstances. So condition #1 is a control where I tell people the bare minimum information. In condition #2 I add on by telling them how the company usually behaves. In condition #3 I tell them how the company usually behaves PLUS describe a specific victim of the company. Condition 4 contains everything in condition 2 and 3 but adds one new factor.

I want to be able to see the effect of adding in that next additional piece of information in each condition, but I am not sure where to start. A similar paper in my field does something similar and they call it "hierarchical logistic regression" but I think some have objected to him calling it that saying it is not the appropriate term.

I have access to SPSS and R and SAS. I am most comfortable in SPSS and am OK in R and am below average in SAS. Any help is appreciated.

$\endgroup$

1 Answer 1

0
$\begingroup$

You can fit a binary outcomes regression model, but to get the tests you want, you'll have to use a type of contrast coding called backward or successive differences coding. In this coding scheme, the coefficient on the dummy for each non-reference level of the condition variable corresponds to the difference between that level and the previous levels. So, for example, the coefficient on the dummy for level B corresponds to the difference between level B and level A.

The model you want to use is called the binomial regression model with an identity link. With this model, the coefficients correspond to probability differences. This is a type of generalized linear model.

In R, you would run the following:

summary(glm(outcome ~ condition, data = data, 
            family = binomial(link = "identity"), 
            contrasts = list(condition = MASS::contr.sdif)))

The intercept is the mean of the proportion of 1s across conditions.

For SPSS, check out this page, which explains how to run this type of regression in a few ways using backward differences contrast coding (and other coding schemes). You should use the generalized linear model command and ensure you correctly select the family (binomial) and link (identity).

$\endgroup$
3
  • $\begingroup$ Thank you! This code worked. If you don't mind could I also ask if you know how to do something else? If i wanted to compare, for instance, condition 5 to the average of all the conditions before it, rather than just condition 4, would you know how to do that? $\endgroup$ Commented Mar 25, 2020 at 15:14
  • $\begingroup$ I'm glad it worked. Please upvote and mark the answer as chosen if you feel I answered your question satisfactorily. $\endgroup$
    – Noah
    Commented Mar 25, 2020 at 15:21
  • $\begingroup$ The easiest way would be to run the same model without contrasts and set condition 5 to be the reference category using relevel(). Then use the glht() function in the multcomp package to perform the test. If you levels were C1, C2, etc., it would look like summary(glht(fit, "(conditionC1 + conditionC2 + conditionC3 + conditionC4)/4 = 0")) where fit is the lm object. Replace condition and the condition levels with the actual name of the variable and factor levels. $\endgroup$
    – Noah
    Commented Mar 25, 2020 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.