cyq1998
February 27, 2021, 4:25am
1
I'm trying to use r2glmm to get partial r squared, but I keep getting the error below. The model A runs fine. Does anyone know how to fix it? Thanks!
A <- glmer(ABCDFAM_ncols$currentdepression ~ ABCDFAM_ncols$rsfmri_cor_ngd_df_scs_hprh_z + ABCDFAM_ncols$interview_age.x + ABCDFAM_ncols$gender.x + ABCDFAM_ncols$rsfmri_c_ngd_stnvols + (1|FAMID) + (1|site_id_l), data = ABCDFAM_ncols, family = 'binomial', control = cl1)
summary(A)
r2beta(model = A, method = 'sgv', data = 'null')
Error in data[, y] : incorrect number of dimensions
Max
February 27, 2021, 4:01pm
2
I would try getting rid of the ABCDFAM_ncols$
parts of the formula. You don't need to do that; just use the variables.
cyq1998
February 28, 2021, 10:11pm
3
Thank you for your help. I got rid of the ABCDFAM_ncols$, but the code didn't work either.
Max
March 1, 2021, 3:08am
4
Can you please provide a minimal reprex (reproducible example)? The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it: please help me help you!
If you've never heard of a reprex before, start by reading "What is a reprex ", and follow the advice further down that page.
system
Closed
March 22, 2021, 3:08am
5
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.