Dear Statalist community,
I have a very small sample (n=98) from experimental data and one of my logit models dropps some observations because of perfect prediction of the outcome variable.
When trying to find a solution in this forum, I first read #2 . Based on the suggestions from this thread, I tried to run -exlogistic- but it required more memory than available on my computer. Then I used Joseph Coveney's -firthlogit- command instead:
This worked and then I tried to find a solution to estimate the average marginal effects of X1. I found #2 and a code by Joseph Coveney's for exactly my question. Applied to my example I ran:
Unfortunately, this would not converge:
Do you have any ideas what I can do instead?
I have a very small sample (n=98) from experimental data and one of my logit models dropps some observations because of perfect prediction of the outcome variable.
When trying to find a solution in this forum, I first read #2 . Based on the suggestions from this thread, I tried to run -exlogistic- but it required more memory than available on my computer. Then I used Joseph Coveney's -firthlogit- command instead:
Code:
firthlogit Y c.X1##i.Treatment i.Treatment##c.X2 $ControlVars
Code:
firthlogit Y c.X1##i.Treatment i.Treatment##c.X2 $ControlVars tempname B matrix define `B' = e(b) logit Y c.X1##i.Treatment i.Treatment##c.X2 $ControlVars, robust asis from(`B', copy) iterate(0)
Code:
Iteration 0: Log pseudolikelihood = -49.828919 convergence not achieved
Comment