Dear all
I'm working in Stata 14.2.
I'm doing a two-level logit model with melogit. I'm interested in a cross-level interaction between the variable win (first level) and the variable camp (second level).
I think in this case, I have to take the first level variable in the random part of the model. Is this right?
Because win ist a factor variable i need the R. notation.
In the Stata manuals the .R notation ist normally used with the _all option. But this option takes all cluster together. I don't understand why this should makes sense.
So my question is what ist the difference between the following models? and which one should I take?
Code1
. melogit entscheid i.win##i.wissen i.win##i.prä i.win##i.Wirtschaft age i.educ i.sex i.lang i.win##c.camp || _all: R.win, cov(unstructured) intpoints(30)
Code2 with group identity variable
melogit entscheid i.win##i.wissen i.win##i.prä i.win##i.Wirtschaft i.win##ib2.zukunft age i.educ i.sex i.lang i.win##c.camp || idnr:R.win, covariance(unstructured) intpoints(30)
idnr ist the identifying variable.
And why is there only one var(_cons) in the output? Should not be there a variance for each category of win?
Related Posts with Multilevel crossed interaction for factor variable
max and if togetherI want to generate a binary variable name “eldest” as follows: if a person is the most aged person …
Make zero line thickerHi everyone, I plotted some figures in Stata as below. I wonder if there's any command or option to…
Highlight lines on spaghetti plotHello, I am working with the following dataset. Code: * Example generated by -dataex-. To install:…
variable RR already defined variable Lower not found error during Mantel–Haenszel estimate of the rate ratioHello everyone, I hope you're all doing fine. Firstly, I wanted to express how grateful am I for you…
Displaying Percent and Rawpercent Statistics as columns using table with multiple subgroupsHi all, Not sure if I've describe the problem properly in the title, but I've been trying to learn …
Subscribe to:
Post Comments (Atom)
0 Response to Multilevel crossed interaction for factor variable
Post a Comment