View source: R/object_specific.R
model_data | R Documentation |
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.
model_data(model, dep = FALSE, varname = NULL, incl_dep = FALSE)
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? |
A data.frame object if dep or varname is not specified, otherwise a vector.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.