Hi All,
I am running choice models in STATA 16 MP with the new "cmclogit" command and ran into a few issues with the weights.
The set up: I have a relatively large sample: 5,275,560 observations nested in 186,421 cases (between 14-34 alternative per observation). I run the same model once without weights, and once with weighted (using probability weights):
//set up
cmset cmset id_n major_name
//unweighted model
cmclogit choice $m1 if a==0
//weighted model
cmclogit choice $m1 if a==0 [pw=weight]
The problem: the N in my weighted model dropped to 251,524 observations nested in 17966 cases. The reason for that, I found out it, is that it ran only for the subset of cases that had only 14 alternatives, even though all cases have weights, and the weights do not vary within cases. Any idea why it does that, and how can I fix it?
Also note that this problem did not occur when I estimated the same model with the acslogit command.
Thank you!
Related Posts with weights with cmclogit
how to loop with tab2xl?I tried to use tab2xl in a loop to generate sheets faster, but after running the code there's no fil…
Multiple stored results from tabstat and esttabDear All, I am running different summary statistics based on the if condition. Then I am trying to …
Fitting Large, Multidimensional Tables to a Word DocumentHi all - hoping folks can help me manage a large multi-dimensional table that I need to output to a …
Error Code (199)Hello Everyone, I'm Kousay, and I'm conducting research on the impact of the pandemic on the firm fi…
Preparing Panel Data with repeated time values within panel (xtset)Hey everyone, I am working with survey data (PSID) and am currently facing some difficulties regardi…
Subscribe to:
Post Comments (Atom)
0 Response to weights with cmclogit
Post a Comment