# Standard deviation as dependent variable inside a HLM

I'm not a statistician so maybe my question is very simple but I've encountered some difficulties reading a statistical method in a cognitive psychology paper. Basically the dependent variable to model is a normal distribution where the mean and the standard deviation corresponds respectively to a systematic error in the experimental tasks and the precision in the task.

Authors report, without more reference or code, to perform a Hierarchical Linear Model:

We used HLM to examine the influence of trait anxiety, emotional valence, and their interaction effect on visual working memory resolution. The level-1 analysis included the within-individual variables (i.e., memory precision, two dummy variables indicating valence). The level-2 analysis included the betweenindividual variables (e.g., the standardized trait anxiety score). We used HLM 2 (measures within persons) to analyze the hierarchical model. Memory precision (i.e., the SD of error distribution) was entered as the outcome variable.

Given that I've a similar experiment, my question regards how to implement a HLM (I usually work with linear mixed-effects models) that model a standard deviation? Given that is basically a linear regression I should model the mean?

The reference is:

You can have a standard deviation as an outcome in a regression model, multilevel or otherwise. The question is whether doing so leads to a model that makes sense and does not violate any of the regression assumptions as it relates to normality of the residuals. Regarding the residuals, you will have to check that yourself by looking at residual plots (e.g., plot(lmer_model) and lattice::qqmath(lmer_model) in R).
Whether it makes sense to model the standard deviation is really a substantive issue. However, I am unclear how your data is set up. When you said standard deviation I assumed that you meant a measure of the spread of data for each person. If so, that would be a person-level variable. In dplyr code: df %>% group_by(id) %>% mutate(sd=sd(dep_var)). Unless you have data at a higher level of nesting, then I am not sure why you would need a multilevel model.