View source: R/lm_betaselect_methods.R
coef.lm_betaselect | R Documentation |
Return the estimates of
coefficients in an
lm_betaselect
-class or
glm_betaselect
-class object.
## S3 method for class 'lm_betaselect'
coef(
object,
complete = FALSE,
type = c("beta", "standardized", "raw", "unstandardized"),
...
)
## S3 method for class 'glm_betaselect'
coef(
object,
complete = FALSE,
type = c("beta", "standardized", "raw", "unstandardized"),
...
)
object |
The output of
|
complete |
If |
type |
String. If |
... |
Other arguments. Ignored. |
By default, it extracts the regression coefficients after the selected variables have been standardized. If requested, it can also return the regression coefficients before standardization.
A numeric vector: The estimate of regression coefficients.
Shu Fai Cheung https://orcid.org/0000-0002-9871-9448
lm_betaselect()
and
glm_betaselect()
data(data_test_mod_cat)
lm_beta_x <- lm_betaselect(dv ~ iv*mod + cov1 + cat1,
data = data_test_mod_cat,
to_standardize = "iv")
coef(lm_beta_x)
coef(lm_beta_x, type = "raw")
data_test_mod_cat$p <- scale(data_test_mod_cat$dv)[, 1]
data_test_mod_cat$p <- ifelse(data_test_mod_cat$p > 0,
yes = 1,
no = 0)
logistic_beta_x <- glm_betaselect(p ~ iv*mod + cov1 + cat1,
data = data_test_mod_cat,
family = binomial,
to_standardize = "iv")
coef(logistic_beta_x)
coef(logistic_beta_x, type = "raw")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.