Dear Statalisters,
I have been (slowly) learning multilevel modelling in Stata and right now we are in the middle of a productive discussion comparing Stata vs MLwiN.
I am trying to show the benefits of post-estimation commands in Stata, graphs, etc. However, I am not 100% sure regarding the syntax when it comes to high order models (e.g., 4 levels). The analysis I am trying to replicate is based on a previous clinical trial [1], whose data structure is as follows:

In a nutshell: repeated measurements are nested within sites, which are nested within teeth, which is turn are nested in subjects.
I am considering the following syntax:
So, this would be a four-level model with four random-effects equations. The first equation is a random intercept at the subject level. The second is a random intercept at the tooth level, the third is a random intercept at the site level. The fourth is a random intercept at time? Any suggestions on how to incorporate correctly a time-dependent explanatory variable?
Any tips/suggestions are extremely welcome.
All the best,
Tiago
Reference
[1] Müller, H. P., Barrieshi‐Nusair, K. M., Könönen, E., & Yang, M. (2006). Effect of triclosan/copolymer‐containing toothpaste on the association between plaque and gingival bleeding: a randomized controlled clinical trial. Journal of clinical periodontology, 33(11), 811-818. https://onlinelibrary.wiley.com/doi/...X.2006.00993.x
I have been (slowly) learning multilevel modelling in Stata and right now we are in the middle of a productive discussion comparing Stata vs MLwiN.
I am trying to show the benefits of post-estimation commands in Stata, graphs, etc. However, I am not 100% sure regarding the syntax when it comes to high order models (e.g., 4 levels). The analysis I am trying to replicate is based on a previous clinical trial [1], whose data structure is as follows:
In a nutshell: repeated measurements are nested within sites, which are nested within teeth, which is turn are nested in subjects.
I am considering the following syntax:
Code:
command dependent_variable independent_variables || subject: || tooth: || sites: || time:
Any tips/suggestions are extremely welcome.
All the best,
Tiago
Reference
[1] Müller, H. P., Barrieshi‐Nusair, K. M., Könönen, E., & Yang, M. (2006). Effect of triclosan/copolymer‐containing toothpaste on the association between plaque and gingival bleeding: a randomized controlled clinical trial. Journal of clinical periodontology, 33(11), 811-818. https://onlinelibrary.wiley.com/doi/...X.2006.00993.x
Comment