Get the data with which the distributional regression model of interest was
estimated (see distreg_checker for a list of supported object
classes). By default, only explanatory variables are returned.
Usage
model_data(model, dep = FALSE, varname = NULL, incl_dep = FALSE)
Arguments
model
A gamlss or bamlss object.
dep
If TRUE, then only the dependent variable is returned.
varname
Variable name in character form that should be returned. If
this is specified, only the desired variable is returned.
incl_dep
Should the dependent variable be included?
Value
A data.frame object if dep or varname is not specified, otherwise a
vector.
# NOT RUN {library("betareg")
# Get some databeta_dat <- model_fam_data(fam_name = "betareg")
# Estimate modelbetamod <- betareg(betareg ~ ., data = beta_dat)
# Get datamodel_data(betamod)
# }