0
$\begingroup$

I have a dataset of longitudinal measurements for different sample individuals, with some covariates such as age, sex, time period, etc. The number of measurements taken for each individual varies. I would like to model the variance of the longitudinal measurements, including the covariates in the model with interactions between the covariates. My first instinct is that a hierarchical linear model could be appropriate, as there is a nested structure of correlated measurements within patients, and I am hoping that using a hierarchical linear model will also account for the differing number of observations within each individual (fewer measurements ~ less precise estimate ~ lower weight, something like that.) However, I have no idea where to begin when directly modeling the variance, instead of the mean, much less in the context of a hierarchical model.

Any advice or guidance would be greatly appreciated, either resources or code examples (R preferred). (I believe) that non-bayesian methods would be an easier sell, though I am generally open to methodology.

Thank you!

$\endgroup$
4
  • $\begingroup$ I probably would model mean and variance. However, the approach depends on the nature of your dependent variable. E.g., maybe, you can just use nlme::lme, which allows you to specify a variance model. Or maybe, beta-regression is suitable, which allows modelling the precision parameter. Also, what exactly does "time period" measure? Do you perhaps need a survival model? $\endgroup$
    – Roland
    Commented May 16, 2023 at 5:21
  • $\begingroup$ Thanks for replying. The main goal is to compare the difference in the variance of the measurements taken in each of the different time periods. While there are some issues with missing data, I don't know if a survival model would be appropriate ~ the measurements all took place over 24 hours, and there isn't an outcome that would result in end of measurement (eg death). The number of measurements and measurement intervals vary greatly between individuals. $\endgroup$ Commented May 16, 2023 at 6:12
  • $\begingroup$ Yes, I understand. You haven't answered all my questions though. Check out the documentation of the lme function and pay special attention to the documentation of the weights parameter as well as to help("varClasses"). I still think you should model both mean and variance. $\endgroup$
    – Roland
    Commented May 16, 2023 at 6:35
  • $\begingroup$ I will take a look! Also I'm sorry to ask but what questions still need clarification? $\endgroup$ Commented May 16, 2023 at 12:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.