Hello,
Thank you for reading my post. I am seeking advice about the following problem:
I am estimating a model with the melogit command and I am encountering an error. The issue arises when I specify a random slope on a dummy variable that does not vary within groups (only across groups). Stata produces a "." for the confidence intervals on the variance of the dummy variable in my random effects equation. When I attempt a likelihood ratio test of the random slope/random intercept model against a simpler random intercept model, Stata cannot compute the test.
Can anyone tell me why this is happening? Is it not possible to specify a random slope on a dummy variable that does not vary within groups? (For context, the variable represents the ideology of a political organization, which does not change over the life of the group, only across different groups.)
A simplified version of the model and output are below. x3 is the dummy variable in question.
Command entered:
melogit dep_var x1 x2 x3 ... xn || group_var: x3 , difficult
Result:
Mixed-effects logistic regression Number of obs = 9,403
Group variable: group_var Number of groups = 111
Obs per group:
min = 1
avg = 70.3
max = 1,602
Integration method: mvaghermite Integration pts. = 7
Wald chi2(16) = 122.15
Log likelihood = -1429.8005 Prob > chi2 = 0.0000
----------------------------------------------------------------------------------
dep_var | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------+----------------------------------------------------------------
x1 | -.9199624 .2245428 -4.10 0.000 -1.360058 -.4798666
x2 | .2273233 .258696 0.88 0.380 -.2797115 .7343581
x3 | -.4584869 .2303522 -1.99 0.047 -.9099688 -.0070049
[some variables not shown]
xn | 3.570397 .5860844 6.09 0.000 2.421693 4.719101
_cons | -5.265287 .7204782 -7.31 0.000 -6.677399 -3.853176
-----------------+----------------------------------------------------------------
group-var |
var(x3) | 1.28e-28 1.96e-14 . .
var(_cons)| 2.575771 .6452784 1.576396 4.20871
---------------------------------------------------------------------------------
LR test vs. logistic model: chibar2(01) = 424.62 Prob >= chibar2 = 0.0000
Related Posts with Errors using random slope on dummy variable
Frequency weight in a before and after graph (twoway pccapsym)Hi. I have a data set where I look at number of events before and after a certain time-point. I wan…
Creating a new variable based on the value of other variablesHi all, I have created a categorical variable (values 1 through 5) in excel based on certain charac…
Calculate normalized euclidean distanceHi all, The Euclidean distance matrix could be obtained by using Code: use http://www.stata-press.…
Selected Graphs for Panel Data CategoriesHi, I'm new to Stata and I'm trying to get some panel-times series graphs for selected countries. Sp…
Bootstrap with 2 way fixed effects in panel data using reghdfeDear Statalist, I am estimating a model of House Price shocks on divorce rates. I am using the regh…
Subscribe to:
Post Comments (Atom)
0 Response to Errors using random slope on dummy variable
Post a Comment