Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | David Hoaglin <dchoaglin@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: ordinal mixed effects model with interaction and quadratic terms |
Date | Sat, 29 Mar 2014 08:12:08 -0400 |
Julian, Your model should contain the interaction between sex and age_sqz. The syntax suggested by Darcy may be one way to do it, though I think you z-standardized age-squared, rather than squaring z-standardized age. What is the evidence (in the data) that the nonlinear effects of age are quadratic (or reasonably well approximated by a quadratic)? Nonlinear effects can take a variety of forms, and many (perhaps most) of those forms are not quadratic. You may be able to get your data to point toward a suitable nonlinear form for age. David Hoaglin On Fri, Mar 28, 2014 at 3:59 PM, Pritsch, Julian <j.pritsch@mpicc.de> wrote: > Dear statalist-users, > > I am estimating a ordinal multilevel model using the -meologit- command. My dependent variable has 4 categories (0-3). > In my Level-1 model I introduced a dummy for sex (sex) and a z-standardized version of age (agez). Additionally, I introduced and z-standardized squared-term of age (age_sqz) because I want to show non-linear effects of age on my DV. > > > My question is twofold: > (1) I want to introduce an interaction term of sex & agez: Do I also need to form an interaction term of sex and the squared version of agez to specify my model correctly? > > (2) After estimating my model I would like to find out (using the -marginsplot- command), if there are any differences between male and female respondents regarding the age effect. > > Regarding question (2) I tried the following: > > ---------------------code----------------------------------------------- > *for outcome(0) > margins sex, at(agez=(-1.88 -1.19 0.01 1.11 1.85)) vsquish /// > level(99) /// > predict(outcome(0) fixedonly) > > -------------------------------------------------------------------------- > *Note: the values for agez are the 2/15/50/85/98-percentile to represent -2SD/-1SD/ 0 /+1SD/+2SD > > > I repeat that syntax for every outcome(0,1,2,3) and will try to combine the graphs. > > Is there a more elegant way to do this? And what about the interaction of sex and the squared term of age (age_sqz) > > Any advice would be appreciated. > > Julian * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/