# SCS 2017: Longitudinal and Nested Data/References and links

## SEMs and Mixed Models

• Papers on the relationship between the multilevel/mixed modeling and structural equation modeling (SEM) with latent variables:
• Bauer, D.J. (2003). Estimating multilevel linear models as structural equation models. Journal of Educational and Behavioral Statistics, 28, 135-167. [1]
• Curran, P.J. (2003). Have multilevel models been structural equation models all along? Multivariate Behavioral Research, 38, 529-569. [2]

## HMC and Stan

### Important pointers

• Don't use a prior with a smaller range than the range specified by the limits on the prior.

### Near-zero variances

Likelihood goes to $\infty$ but probability is nearly 0.

• Bates (2014) Random effect variance = zero would simplify the model by dropping the variance.
In a sense, he would lasso them to zero.
• Gelman (2011) Avoiding boundary estimates using a prior distribution as regularization
This 2011 blog post by Gelman discusses the use of a prior for regularization when using a 'glmer' or 'lmer' to avoid boundary correlations and boundary variances in the G matrix. He suggests a gamma(2, 1/A) where A is large for for the scale parameter, i.e. the between cluster standard deviation. The expected value of the distribution is then 2A and the density $f(\phi) = \frac{1}{A^2}\phi e^{-\phi/A}$ approaches 0 at 0.
Using Stan, one can use a gamma(2, 1/A) prior for the scale parameters and a LKJ_corr_cholesky(a) prior with a > 1, for the correlation matrix.
• LKJ priors