set_mean | R Documentation |
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).
set_mean(input, vary_by = NULL)
input |
A |
vary_by |
A character string with the name of a variable over which the output dataframe should vary. |
A data.frame
object with one row
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.