The summary method
for glm_betaselect-class objects.
# S3 method for glm_betaselect
summary(
object,
dispersion = NULL,
correlation = FALSE,
symbolic.cor = FALSE,
trace = FALSE,
test = c("LRT", "Rao"),
se_method = c("boot", "bootstrap", "z", "glm", "default"),
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"),
transform_b = NULL,
transform_b_name = NULL,
...
)# S3 method for summary.glm_betaselect
print(
x,
est_digits = 3,
symbolic.cor = x$symbolic.cor,
signif.stars = getOption("show.signif.stars"),
show.residuals = FALSE,
z_digits = 3,
pvalue_less_than = 0.001,
...
)
It returns an object of class
summary.glm_betaselect, which is
similar to the output of
stats::summary.glm(), with additional
information on the standardization
and bootstrapping, if requested.
The print-method of
summary.glm_betaselect is called
for its side effect. The object x
is returned invisibly.
The output of
glm_betaselect().
The dispersion
parameter. If NULL, then it is
extracted from the object. If
a scalar, it will be used as
the dispersion parameter. See
stats::summary.glm() for details.
If TRUE, the
correlation matrix of the estimates
will be returned. The same argument
in stats::summary.glm(). Default
is FALSE.
If TRUE,
correlations are printed in symbolic
form as in stats::summary.glm().
Default is FALSE.
Logical. Whether
profiling will be traced when forming
the confidence interval if
se_method is "default", "z", or
"glm". Ignored if ci is FALSE.
See stats::confint.glm() for
details.
The test used for
se_method is "default", "z", or
"glm". Ignored if ci is FALSE.
See stats::confint.glm() for
details.
The method used to
compute the standard errors and
confidence intervals (if requested).
If bootstrapping was
requested when calling
glm_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 "z", "glm", or "default",
then the usual glm
standard errors are
returned.
Default is "boot".
Logical. Whether
confidence intervals are computed.
Default is FALSE.
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.
The function
to be used to transform the
confidence limits. For example,
if set to exp, the confidence
limits will be exponentiated. Users
need to decide whether the transformed
limits are meaningful. Default is
NULL.
If
transform_b is a function, then
this is the name of the transformed
coefficients. Default is
"Estimate(Transformed)"
Additional arguments passed to other methods.
The output of
summary.glm_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.
Whether "stars"
(asterisks) are printed to denote
the level of significance achieved
for each coefficient. Default is
TRUE.
If TRUE,
a summary of the deviance residuals
will be printed. Default is FALSE.
The number of digits
after the decimal to be displayed for
the z or similar statistic (in the
column "z value").
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.glm_betaselect-class object
for the results with selected variables
standardized. By setting type to
"raw" or "unstandardized", it
returns the summary for the results
before standardization.
The print method of
summary.glm_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
glm_betaselect()
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)
# bootstrap should be set to 2000 or 5000 in real studies
logistic_beta_x <- glm_betaselect(p ~ iv*mod + cov1 + cat1,
data = data_test_mod_cat,
family = binomial,
to_standardize = "iv",
do_boot = TRUE,
bootstrap = 100,
iseed = 1234)
summary(logistic_beta_x)
Run the code above in your browser using DataLab