# load sample models:
data(rotif.mods)
# choose a particular model to play with:
mod <- rotif.mods$models[[1]]
RsqGLM(model = mod)
# you can also use RsqGLM with vectors of observed and predicted values
# instead of a model object:
RsqGLM(obs = mod$y, pred = mod$fitted.values)
# plotting arguments can be modified:
par(mar = c(6, 3, 2, 1))
RsqGLM(obs = mod$y, pred = mod$fitted.values, col = "seagreen", border = NA,
ylim = c(0, 1), las = 2, main = "Pseudo-R-squared values")
Run the code above in your browser using DataLab