View source: R/lm_betaselect_methods.R
anova.lm_betaselect | R Documentation |
Return the analysis
of variance tables for
the outputs of
lm_betaselect()
and
glm_betaselect()
.
## S3 method for class 'lm_betaselect'
anova(object, ..., type = c("beta", "standardized", "raw", "unstandardized"))
## S3 method for class 'glm_betaselect'
anova(
object,
...,
type = c("beta", "standardized", "raw", "unstandardized"),
dispersion = NULL,
test = NULL
)
object |
The output of
|
... |
Additional outputs
of |
type |
String. If
|
dispersion |
To be passed to
|
test |
String. The test to be
conducted. Please refer to
|
By default, it calls stats::anova()
on the results with selected variables
standardized. By setting type
to
"raw"
or "unstandardized"
, it
calls stats::anova()
on the results
before standardization.
It returns an object of class
anova
, which is identical to
the output of stats::anova()
in
structure.
Shu Fai Cheung https://orcid.org/0000-0002-9871-9448
lm_betaselect()
data(data_test_mod_cat)
lm_beta_x <- lm_betaselect(dv ~ iv*mod + cov1 + cat1,
data = data_test_mod_cat,
to_standardize = "iv",
do_boot = FALSE)
anova(lm_beta_x)
anova(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")
anova(logistic_beta_x)
anova(logistic_beta_x, type = "raw")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.