How to perform regression analysis with random effects that cluster on the subject level?

2 次查看(过去 30 天)
I would very much appreciate some help on the following:
I would like to perform a regression analysis on a dichotomous dependent variable Y using the variables A (Scale), B (Scale), and C (Categorical) as predictors. Furthermore, I would like to adjust for clustering on the subject level (ID). How can I perform such a regression analysis?
I was able to perform the regression without the subject clustering:
ds = dataset(A, B, C, Y, 'Varnames', {'A','B','C','Y'});
modelspec = 'Y ~ A + B + C';
mdl = fitglm(ds, modelspec, 'Categorical', [3], 'Distribution', 'binomial', 'Link', 'logit');
But how can I extend the model for the adjustment for the clustering on the subject level? Thanks in advance!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by