I normally use r.squaredGLMM() (from MuMIn package) to extract marginal and conditional R-squared (or pseudo-R squared) values for my glmm models, however this does not work for nlme models.
For example, I am running this sort of nlme model:
model=nlme(wt~A*(1-exp(k*(t0-age))), #Function
fixed=A+k+t0~1,#Fixed effects
random=list(squirrel_id = pdDiag(A+t0+k~1)), #pdDiag specifies random effects are uncorrelated
data= growth_envt_F, # Input dataset
start=c(A=253.6,k=.03348,t0=32.02158), #Specifies where to start
na.action=na.omit, #Omit any NA values
control=nlmeControl(maxIter=200, pnlsMaxIter=10, msMaxIter=100)) #Maximum number of iterations before determined divergent
Does anyone know a package that I can use to do this given r.squaredGLMM(model) doesn't work with nlme models?
Background: We are working in a situation where we need to compare multiple models to see how the perform relative to each other (without concern for parsimony). We are using these models to estimate growth for real data. The models all appear to do a poor job of estimating growth rate for the data, but this is visually subjective and we have been asked by a reviewer to present a more objective estimate like a goodness of fit measure.
model.rmse = sqrt(mean(model$residuals^2))– gibson25 Nov 30 '21 at 07:25