I am fitting a logistic growth model with menl using the substitutable expressions feature. Here is an example.
menl DSS = {k:}/(1+exp(-{r:}*(Day-{d:}))),
define(k: i.GCode ## i.R Uk[MID])
define(d: i.GCode ## i.R Ud[MID])
define(r: i.GCode ## i.R)
rescovariance(ar 1 , t(Day) group(MID)) covariance(Uk Ud, unstructured)
The define command is a real convenience with factor variables, but is there a way to include a combination of factor and continuous variables. Suppose the variable X is not continuous. define(k: i.GCode ## c.X) does not work. Stata seems to think c.X is a random effect.
I have written long-forms of the define statement, e.g. without an interaction, define(k:{k0} + {k1}*TG1 +{k2}*TG2 +{k3}*TG3 + {Uk[MID]}) but would like to know if there is a way to use continuous and factor variables with the convenience of define.
menl DSS = {k:}/(1+exp(-{r:}*(Day-{d:}))),
define(k: i.GCode ## i.R Uk[MID])
define(d: i.GCode ## i.R Ud[MID])
define(r: i.GCode ## i.R)
rescovariance(ar 1 , t(Day) group(MID)) covariance(Uk Ud, unstructured)
The define command is a real convenience with factor variables, but is there a way to include a combination of factor and continuous variables. Suppose the variable X is not continuous. define(k: i.GCode ## c.X) does not work. Stata seems to think c.X is a random effect.
I have written long-forms of the define statement, e.g. without an interaction, define(k:{k0} + {k1}*TG1 +{k2}*TG2 +{k3}*TG3 + {Uk[MID]}) but would like to know if there is a way to use continuous and factor variables with the convenience of define.