The summary method
for lm_betaselect-class objects.
# S3 method for lm_betaselect
summary(
object,
correlation = FALSE,
symbolic.cor = FALSE,
se_method = c("boot", "bootstrap", "t", "lm", "ls"),
ci = TRUE,
level = 0.95,
boot_type = c("perc", "bc"),
boot_pvalue_type = c("asymmetric", "norm"),
type = c("beta", "standardized", "raw", "unstandardized"),
print_raw = c("none", "before_ci", "after_ci"),
...
)# S3 method for summary.lm_betaselect
print(
x,
est_digits = 3,
symbolic.cor = x$symbolic.cor,
signif.stars = getOption("show.signif.stars"),
tz_digits = 3,
pvalue_less_than = 0.001,
...
)
It returns an object of class
summary.lm_betaselect, which is
similar to the output of
stats::summary.lm(), with additional
information on the standardization
and bootstrapping, if requested.
The print-method of
summary.lm_betaselect is called
for its side effect. The object x
is returned invisibly.
The output of
lm_betaselect().
If TRUE, the
correlation matrix of the estimates
will be returned. The same argument
in stats::summary.lm(). Default
is FALSE.
If TRUE,
correlations are printed in symbolic
form as in stats::summary.lm().
Default is FALSE.
The method used to
compute the standard errors and
confidence intervals (if requested).
If bootstrapping was
requested when calling
lm_betaselect() and this argument
is set to "bootstrap" or "boot",
the bootstrap standard errors are
returned. If bootstrapping
was not requested or if this argument
is set to "t", "lm", or "ls",
then the usual lm
standard errors are
returned.
Default is "boot".
Logical. Whether
confidence intervals are computed.
Default is TRUE.
The level of confidence, default is .95, returning the 95% confidence interval.
The type of
bootstrap confidence intervals,
if requested.
Currently, it supports "perc",
percentile bootstrap confidence
intervals, and "bc", bias-corrected
bootstrap confidence interval.
The type
of p-values if se_method is
"boot" or "bootstrap". If "norm",
then the z score is used to compute
the p-value using a
standard normal distribution.
If "asymmetric", the default, then
the method presented in
Asparouhov and Muthén (2021) is used
to compute the p-value based on the
bootstrap distribution.
String. If
"unstandardized" or "raw", the
output before standardization
are used If "beta" or
"standardized", then the
output after selected
variables standardized are returned.
Default is "beta".
Control whether
the estimates before selected
standardization are printed when
type is "beta" or "standardized".
If "none", the default, then it
will not be printed. If set to "before_ci"
and ci is TRUE, then will be
inserted to the left of the confidence
intervals. If set to "after_ci"andciisTRUE, then will be printed to the right of the confidence intervals. If ciisFALSE`, then will
be printed to the right of the
standardized estimates.
Additional arguments passed to other methods.
The output of
summary.lm_betaselect().
The number of
digits after the decimal to be
displayed for the coefficient
estimates, their standard errors, and
confidence intervals (if present).
Note that the values will be rounded
to this number of digits before
printing. If all digits at this
position are zero for all values, the
values may be displayed with fewer
digits. Note that the coefficient
table is printed by
stats::printCoefmat(). If some
numbers are vary large, the number of
digits after the decimal may be
smaller than est_digits due to a
limit on the column width. This value
also determines the number of digits
for displayed R-squared.
Whether "stars"
(asterisks) are printed to denote
the level of significance achieved
for each coefficient. Default is
TRUE.
The number of digits
after the decimal to be displayed for
the t or similar statistic (in the
column "t value" or "z value").
This value also determines the number
of digits for the F statistic for
the R-squared.
If a
p-value is less than this value, it
will be displayed with "<(this value)". For example, if
pvalue_less_than is .001, the
default, p-values less than .001
will be displayed as <.001. This
value also determines the printout of
the p-value of the F statistic.
(This argument does what eps.Pvalue
does in stats::printCoefmat().)
Shu Fai Cheung https://orcid.org/0000-0002-9871-9448
By default, it returns a
summary.lm_betaselect-class object
for the results with selected variables
standardized. By setting type to
"raw" or "unstandardized", it
return the summary for the results
before standardization.
The print method of
summary.lm_betaselect-class objects
is adapted from
stdmod::print.summary.std_selected().
Asparouhov, A., & Muthén, B. (2021). Bootstrap p-value computation. Retrieved from https://www.statmodel.com/download/FAQ-Bootstrap%20-%20Pvalue.pdf
lm_betaselect()
data(data_test_mod_cat)
# bootstrap should be set to 2000 or 5000 in real studies
lm_beta_x <- lm_betaselect(dv ~ iv*mod + cov1 + cat1,
data = data_test_mod_cat,
to_standardize = "iv",
do_boot = TRUE,
bootstrap = 100,
iseed = 1234)
summary(lm_beta_x)
summary(lm_beta_x, ci = TRUE)
summary(lm_beta_x, boot_pvalue_type = "norm")
summary(lm_beta_x, type = "raw")
Run the code above in your browser using DataLab