model_data {distreg.vis} | R Documentation |
Model data getter
Description
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.
Examples
library("betareg")
# Get some data
beta_dat <- model_fam_data(fam_name = "betareg")
# Estimate model
betamod <- betareg(betareg ~ ., data = beta_dat)
# Get data
model_data(betamod)
[Package distreg.vis version 1.7.5 Index]