Hello Statalist,
I am building a multilevel model to test whether an environmental exposure is linked with individual's weight/change in weight over time.
My dataset comprises 3000 individuals nested within 120 community clusters (clusterid) who were measured at five time points (time). The outcome variable is weight. I need to control for two fixed covariates measured at the individual level (inc and mat_ill). The independent variable of interest is measured at the cluster level (env_exp), and I also need to include two fixed cluster-level covariates (alloc and dens).
Is the following code correct for measuring the effects of env_exp and its interaction with time on weight?
mixed weight inc mat_ill alloc dens env_exp time env_exp#time || clusterid: time
Many thanks!
Related Posts with Multilevel model (mixed command) with clustered, repeated-measures data
Transforming a categorical variable into 1 categorical and 1 binaryHello! Can you tell me how to pull out one of the 4 categorical options of the education variable so…
Is Poisson the correct model here? I have data on a company who instituted a feature where they stop promoting items listed after X ho…
Autocorrelation Parameter Estimates ≥ 1 in SP Stata ManualI noticed a 3 examples in the Spatial Autoregressive Models Reference Manual (Release 16) that 3 exa…
Creating a new variable, from specific values of 3 existing variablesHello, I am really bad in stata and need help. I have a database with 3 variables: birthcountry, aut…
Trouble with reshapeHi all! I am working with DHS data and I am analyzing marriage institutions and siblings' marriage …
Subscribe to:
Post Comments (Atom)
0 Response to Multilevel model (mixed command) with clustered, repeated-measures data
Post a Comment