-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"r2mlm" function not printing full variance decomposition even when L1 predictors are cluster-mean centered #58
Comments
Did this ever get resolved as I'm having the same issue. Null model splits at each level, but add in an additional cluster mean centered covariate and it reverts to "total" variance explained?
|
I am having the same issue adding two or more cluster-mean centered predictors. If added separately variance is split in within and between variance, but for the model with two predictors it just shows total variance. Did I miss something?
$Decompositions $R2s
$Decompositions $R2s
$Decompositions $R2s |
Currently having the same issue, still no solution? |
Same issue here. It's not just changing the response variable that affects things: If I remove the cluster-mean-centered level-1 predictor but retain the cluster-means level-2 predictor, I can generate all 3 barplots for an outcome that only showed the total variance barplot initially. I've also tried re-running the model with only complete observations, which made no difference. So it seems the issue is the association between the level-1 cluster-mean-centered predictor and the outcome, at least in my case. |
Thanks all for reporting this. I'll have more time to look into it at the beginning of December. Apologies for any inconvenience. Has anyone tried the |
Thanks for the fast reply! Your intuition was correct: Using r2mlm_manual(), I can generate total/within/between columns of estimated effects when r2mlm() only provides total. I had success with an lmer() model and also with a glmer() logistic model (but how are you approximating sigma2 for glms?). |
Same here, r2mlm_manual()works fine. Thank you for your reply! |
I'm having an issue which I will describe below.
Setup
Running models (Model 1)
(Model 2)
I'm not sure why the Model 2 isn't producing a print result that shows the variance explained at each level as it does in Model 1. It is only showing the "total" variance explained. The
X
variable is cluster-mean centered, and the only thing that changes across the two models is the dependent variable, which is in the raw form in both cases(i.e., it still contains variance as a function of both the within and between cluster levels). I'm not sure whyY1
andY2
are leading to different r2mlm printouts considering they are qualitatively identical as far as I can tell.I've attached the csv file that can be used for running this code, as this seems to be a variable-specific problem.
Test_data.csv
Thank you for the work you've done on this topic and in creating this package!
Joe
The text was updated successfully, but these errors were encountered: