I was going to generate the marginal residuals of a variable by using linear mixed model in R. The marginal residuals are the residuals after adjusting for the fixed effects in the linear mixed model. and I need to use that residual as a new dependent variable used in another linear mixed effect model. I was trying to use "redres" package in R https://github.com/goodekat/redres, but can't even install it. Here's the error:
restarting interrupted promise evaluationinternal error -3 in R_decompress1Error: Failed to install 'redres' from GitHub:
lazy-load database '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/callr/R/callr.rdb' is corrupt
Anyone has any idea how to install it and any other packages can be used to generate the marginal residuals of a variable? Thanks!