Runmlwin syntax for interaction effects
Posted: Thu Oct 16, 2014 7:07 am
Hi there,
I’d like to run a binomial logistic regression with an interaction effect between percrimecat and sex, but I’m not sure about the syntax.
I created dummy variables for a binomial logistic regression model:
* My reference category is low perception of crime (percrimecat==1)
gen percrimeMedium = (percrimecat==2)
gen percrimeHigh = (percrimecat==3)
I’ve tried the STATA term [i.percrimecat#sex] and [percrimecat#sex], as well as [percrimeMedium#sex percrimeHigh#sex] in the bolded section below, but MLwin keeps crushing. What is the right syntax for including interations in the model?
quietly runmlwin aawlktotguide cons percrimeMedium percrimeHigh sex [and here I would like to include the interaction between percrimecat and sex], level2(cd2006:cons) level1(id:) discrete(distribution(binomial) link(logit) denominator(cons) pql2) nopause
runmlwin aawlktotguide cons percrimeMedium percrimeHigh sex [and here I would like to include the interaction between percrimecat and sex], level2(cd2006:cons) level1(id:) discrete(distribution(binomial) link(logit) denominator(cons)) mcmc(on) initsprevious nopause nogroup
Many thanks for your help.
Fatima
I’d like to run a binomial logistic regression with an interaction effect between percrimecat and sex, but I’m not sure about the syntax.
I created dummy variables for a binomial logistic regression model:
* My reference category is low perception of crime (percrimecat==1)
gen percrimeMedium = (percrimecat==2)
gen percrimeHigh = (percrimecat==3)
I’ve tried the STATA term [i.percrimecat#sex] and [percrimecat#sex], as well as [percrimeMedium#sex percrimeHigh#sex] in the bolded section below, but MLwin keeps crushing. What is the right syntax for including interations in the model?
quietly runmlwin aawlktotguide cons percrimeMedium percrimeHigh sex [and here I would like to include the interaction between percrimecat and sex], level2(cd2006:cons) level1(id:) discrete(distribution(binomial) link(logit) denominator(cons) pql2) nopause
runmlwin aawlktotguide cons percrimeMedium percrimeHigh sex [and here I would like to include the interaction between percrimecat and sex], level2(cd2006:cons) level1(id:) discrete(distribution(binomial) link(logit) denominator(cons)) mcmc(on) initsprevious nopause nogroup
Many thanks for your help.
Fatima