View source: R/est_univ_mods.R
est_univ_mods | R Documentation |
Given a dependent variable, a set of possible predictors, and a GLM family, this function estimates a null GLM and all of the simple GLMs.
est_univ_mods(dv, ivs, fam)
dv |
numeric vector or factor of dependent variable values |
ivs |
|
fam |
character vector of length 1 storing the description of the error distribution and link function to be used in the model (see |
We use the expression "simple GLM models" to describe GLM models with a single dependent variable and a single predictor.
List containing:
ll0
: log-likelihoods for the null model
lls
: log-likelihoods for all the simple models
coefs
: if dv
and ivs
are continuous, standardized simple regression coefficients
Edoardo Costantini, 2023
# Run the function on the example data set
dv_con_ivs_con <- est_univ_mods(
dv = GSPCRexdata$y$cont,
ivs = GSPCRexdata$X$cont,
fam = "gaussian"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.