0
$\begingroup$

I have a categorical dependent variable (emerged/not emerged) and two predictors 1) treatment (continuous time, 28 to 35h) and 2) group (test/control). I want to know if test group emerges earlier than control group. I have a n=20 in each group+treatment, but I get structural zeros as control group never emerges before 32h (see data below). Thus I apparently cant use a simple logistic regression directly to compare my two groups.

Here is the data, values are %emergence (calculated) :

Treatment(h)___28___29___30___31___32___33___34___35 Control________0____0____0____0___59___70___100__100 Test__________50___70___90__100__100__100___100__100

Anybody can suggest a method to make this work? Note that I'm prety green in stats, I would appreciate a few details with the suggestions! :)

$\endgroup$
  • 1
    $\begingroup$ I don't understand. What is the problem you face? I do not see why the zeroes are an issue in a logistic regression framework. $\endgroup$ – mkt - Reinstate Monica Jul 5 '17 at 13:47
  • $\begingroup$ Well, I read that one of the conditions for the logistic regression to produce correct estimates is that it shouldn't have cells with 0 events. I may be wrong though...? $\endgroup$ – lerussophile Jul 5 '17 at 13:58
  • $\begingroup$ I don't really understand that objection. The logistic regression will estimate the probability of emergence as a function of time here. That probability will be close to zero till the 31-32 hour time period. Try it out. $\endgroup$ – mkt - Reinstate Monica Jul 5 '17 at 14:07
  • 1
    $\begingroup$ You don't need to calculate an odds ratio at all, since you have a continuous variable here. You can simply calculate the probability of emergence as a function of time in control and in test groups. $\endgroup$ – mkt - Reinstate Monica Jul 5 '17 at 14:22
  • 1
    $\begingroup$ If your only question is did group A emerge before group B, then it shouldn't be too difficult to construct a randomisation test for this. $\endgroup$ – mkt - Reinstate Monica Jul 5 '17 at 14:38
1
$\begingroup$

With a binary target and categorical features, logistic regression can be viewed as a type of log-linear model or contingency table analysis. In chapter 10 of Wickens book, Multiway Contingency Tables Analysis for the Social Sciences, approaches to adjusting degrees of freedom and model results for the presence of structural zeros are discussed. Wickens main point is that "data tables with structural voids lack a complete factorial structure," a necessary requirement for logistic regression tests of independence, where "impossible cells assert themselves as dependencies," pps. 246-247.

One option is to step back from considering time as continuous. Discretizing time would place the model design into the form of a contingency table. This permits one to ignore the missing cells and test for quasi-independence of the valid cells only.

Wickens suggested solution is to employ an iterative proportional fitting algorithm to construct the maximum likelihood estimates which he goes through on a step-by-step basis -- much too involved for a response on this blog. In essence, in constructing the test statistic, the structural zero cells are ignored and degrees of freedom are adjusted or reduced for the missing cells, devising a new test statistic based only on valid cells.

Apologies if this is too involved for a stats newbie but, in point of fact, your problem is not a big one and is quite readily answered. The only issue is that these methods go well beyond the full factorial chi-square tests of independence dealt with in stats 101 courses. There are many, many references and resources on log-linear models, contingency table analysis, and categorical data analysis. While Agresti's books are among the standard, stats "go-to" resources, I prefer Wickens for the greater clarity and lucidity of his writing. To be able to fully address, understand and answer your question, you need to drill into those references.

| cite | improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Stats 101 is pretty much my level indeed. :) But I had already understood that my data could be treated as a contingency table, and I had thought of making categories for the time treatment, which could give me a 2x2 table without 0 cells for example. Thanks for your answer. $\endgroup$ – lerussophile Jul 5 '17 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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