Skip to contents

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 the MC() 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()

Author

Ivan Jacob Agaloos Pesigan

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.0760 100 0.3508 0.6231
#> PCTGRT  0.3915 0.0732 100 0.2643 0.5224
#> PCTSUPP 0.2632 0.0808 100 0.1014 0.4009
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.0760 100 0.3508 0.6231
#> PCTGRT  0.3915 0.0732 100 0.2643 0.5224
#> PCTSUPP 0.2632 0.0808 100 0.1014 0.4009
coef(out)
#>    NARTIC    PCTGRT   PCTSUPP 
#> 0.4951451 0.3914887 0.2632477 
vcov(out)
#>               NARTIC       PCTGRT      PCTSUPP
#> NARTIC   0.005776525 -0.002834952 -0.002143637
#> PCTGRT  -0.002834952  0.005360100 -0.001947940
#> PCTSUPP -0.002143637 -0.001947940  0.006526525
confint(out, level = 0.95)
#>             2.5 %    97.5 %
#> NARTIC  0.3507721 0.6231028
#> PCTGRT  0.2643226 0.5224279
#> PCTSUPP 0.1013892 0.4008517