Estimate Standardized Regression Coefficients and Generate the Corresponding Sampling Distribution Using the Monte Carlo Method
Source:R/betaMC-beta-mc.R
BetaMC.Rd
Estimate Standardized Regression Coefficients and Generate the Corresponding Sampling Distribution Using the Monte Carlo Method
Usage
BetaMC(object, alpha = c(0.05, 0.01, 0.001))
Arguments
- object
Object of class
mc
, that is, the output of theMC()
function.- alpha
Numeric vector. Significance level \(\alpha\).
Value
Returns an object
of class betamc
which is a list with the following elements:
- call
Function call.
- args
Function arguments.
- thetahatstar
Sampling distribution of \(\boldsymbol{\hat{\beta}}\).
- vcov
Sampling variance-covariance matrix of \(\boldsymbol{\hat{\beta}}\).
- est
Vector of estimated \(\boldsymbol{\hat{\beta}}\).
- fun
Function used ("BetaMC").
Details
The vector of standardized regression coefficients (\(\boldsymbol{\hat{\beta}}\)) is derived from each randomly generated vector of parameter estimates. Confidence intervals are generated by obtaining percentiles corresponding to \(100(1 - \alpha)\%\) from the generated sampling distribution of \(\boldsymbol{\hat{\beta}}\), where \(\alpha\) is the significance level.
See also
Other Beta Monte Carlo Functions:
DeltaRSqMC()
,
DiffBetaMC()
,
MC()
,
MCMI()
,
PCorMC()
,
RSqMC()
,
SCorMC()
Examples
# Data ---------------------------------------------------------------------
data("nas1982", package = "betaMC")
# Fit Model in lm ----------------------------------------------------------
object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)
# MC -----------------------------------------------------------------------
mc <- MC(
object,
R = 100, # use a large value e.g., 20000L for actual research
seed = 0508
)
# BetaMC -------------------------------------------------------------------
out <- BetaMC(mc, alpha = 0.05)
## Methods -----------------------------------------------------------------
print(out)
#> Call:
#> BetaMC(object = mc, alpha = 0.05)
#>
#> Standardized regression slopes
#> type = "hc3"
#> est se R 2.5% 97.5%
#> NARTIC 0.4951 0.0750 100 0.3529 0.6199
#> PCTGRT 0.3915 0.0787 100 0.2433 0.5262
#> PCTSUPP 0.2632 0.0830 100 0.1022 0.4312
summary(out)
#> Call:
#> BetaMC(object = mc, alpha = 0.05)
#>
#> Standardized regression slopes
#> type = "hc3"
#> est se R 2.5% 97.5%
#> NARTIC 0.4951 0.0750 100 0.3529 0.6199
#> PCTGRT 0.3915 0.0787 100 0.2433 0.5262
#> PCTSUPP 0.2632 0.0830 100 0.1022 0.4312
coef(out)
#> NARTIC PCTGRT PCTSUPP
#> 0.4951451 0.3914887 0.2632477
vcov(out)
#> NARTIC PCTGRT PCTSUPP
#> NARTIC 0.005628281 -0.002709699 -0.002170765
#> PCTGRT -0.002709699 0.006187753 -0.002434178
#> PCTSUPP -0.002170765 -0.002434178 0.006896427
confint(out, level = 0.95)
#> 2.5 % 97.5 %
#> NARTIC 0.3528997 0.6199483
#> PCTGRT 0.2433208 0.5261893
#> PCTSUPP 0.1022280 0.4311746