set_mean {distreg.vis} | R Documentation |
Obtain mean values and reference categories of variables in a data.frame
Description
This function purely exists for the set_mean
argument of
plot_moments
. It takes a data.frame and obtains the mean values
(numeric variables) and reference categories (categorical covariates).
Usage
set_mean(input, vary_by = NULL)
Arguments
input |
A |
vary_by |
A character string with the name of a variable over which the output dataframe should vary. |
Value
A data.frame
object with one row
Examples
library("betareg")
# Get some data
beta_dat <- model_fam_data(fam_name = "betareg")
# Estimate model
betamod <- betareg(betareg ~ ., data = beta_dat)
# Obtain explanatory variables and set to mean
set_mean(model_data(betamod))
set_mean(model_data(betamod), vary_by = "binomial1")
[Package distreg.vis version 1.7.5 Index]