Solved – Exact logistic regression, R, and elrm: data formatting and output

logisticrregression

I use SPSS, but am forced to use R for exact logistic regression. So I'm brand new to R (and hating it so far) and also new to logistic regression. I've read the original elrm paper and looked at examples of its use. However, I can't find information on the questions below (after the data description).

The fit of two models of cognitive processing was compared for each subject in each of 3 conditions. My binary dependent variable is whether the difference in model fits was significant or not (my "Success" variable below). I have three experimental Conditions: 0, 1, and 2. 0 is my reference group. My question is: is there an overall effect of Condition? If so, which conditions differ? The specific alternative hypothesis is that the proportion/probability of "success" should be greater in conditions 0 and 1 than in condition 2. My data look like

original data

…and so on. SPSS actually creates the dummy variables for you on the fly but they are easy enough to create explicitly.

Question 1: I have read that to use elrm you have to enter the data such that the response variable represents success/number of trials. And as far as I can tell elrm doesn't create dummy variables automatically. I've seen examples of tables representing this data structure, but can't find any step-by-step examples of getting raw data into that format, espescially given a one-variable 3-levels situation. Is there an example out there that I'm missing? If not, is this what the data should look like?

reformated data

I'm not sure how I'd enter the dummy variables into the formula…just as separate variables?

Question 2: I can see how I can get the tests of the coefficients of the dummy variables. But I can't figure out how to get a test of the overall effect of the independent variable. I need to evaluate the overall effect of Condition before looking at individual conditions. Is there a way to get that out of elrm? (I found an example of this done for the aod package which runs regular logistic regression but not exact logistic regression.)

Question 3: I can't find a description of what the p-value for individual coeffeicients represents in elrm. Is this is for the Wald test?

Best Answer

My reading of the literature on exact logistic regression is that it has the same problems of power loss that Fisher's "exact" test has. What got you interested in exact logistic regression? A better approach may be to use penalized maximum likelihood estimation with ordinary unconditional logistic regression. ["Exact" logistic regression is a type of conditional analysis in the same sense as Fisher's test, i.e., it in some ways changes the hypotheses one tests by conditioning on certain margins.]

Related Question