Title: | Monte Carlo for Regression Effect Sizes |
---|---|
Description: | Generates Monte Carlo confidence intervals for standardized regression coefficients (beta) and other effect sizes, including multiple correlation, semipartial correlations, improvement in R-squared, squared partial correlations, and differences in standardized regression coefficients, for models fitted by lm(). 'betaMC' combines ideas from Monte Carlo confidence intervals for the indirect effect (Pesigan and Cheung, 2023 <doi:10.3758/s13428-023-02114-4>) and the sampling covariance matrix of regression coefficients (Dudgeon, 2017 <doi:10.1007/s11336-017-9563-z>) to generate confidence intervals effect sizes in regression. |
Authors: | Ivan Jacob Agaloos Pesigan [aut, cre, cph] |
Maintainer: | Ivan Jacob Agaloos Pesigan <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.3.2.9000 |
Built: | 2024-11-21 05:51:29 UTC |
Source: | https://github.com/jeksterslab/betaMC |
Estimate Standardized Regression Coefficients and Generate the Corresponding Sampling Distribution Using the Monte Carlo Method
BetaMC(object, alpha = c(0.05, 0.01, 0.001))
BetaMC(object, alpha = c(0.05, 0.01, 0.001))
object |
Object of class |
alpha |
Numeric vector.
Significance level |
The vector of standardized regression coefficients
()
is derived from each randomly generated vector of parameter estimates.
Confidence intervals are generated by obtaining
percentiles corresponding to
from the generated sampling
distribution of
,
where
is the significance level.
Returns an object
of class betamc
which is a list with the following elements:
Function call.
Function arguments.
Sampling distribution of
.
Sampling variance-covariance matrix of
.
Vector of estimated
.
Function used ("BetaMC").
Ivan Jacob Agaloos Pesigan
Other Beta Monte Carlo Functions:
DeltaRSqMC()
,
DiffBetaMC()
,
MC()
,
MCMI()
,
PCorMC()
,
RSqMC()
,
SCorMC()
# 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) summary(out) coef(out) vcov(out) confint(out, level = 0.95)
# 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) summary(out) coef(out) vcov(out) confint(out, level = 0.95)
betamc
Estimated Parameter Method for an Object of Class
betamc
## S3 method for class 'betamc' coef(object, ...)
## S3 method for class 'betamc' coef(object, ...)
object |
Object of Class |
... |
additional arguments. |
Returns a vector of estimated parameters.
Ivan Jacob Agaloos Pesigan
betamc
Confidence Intervals Method for an Object of Class
betamc
## S3 method for class 'betamc' confint(object, parm = NULL, level = 0.95, ...)
## S3 method for class 'betamc' confint(object, parm = NULL, level = 0.95, ...)
object |
Object of Class |
parm |
a specification of which parameters are to be given confidence intervals, either a vector of numbers or a vector of names. If missing, all parameters are considered. |
level |
the confidence level required. |
... |
additional arguments. |
Returns a matrix of confidence intervals.
Ivan Jacob Agaloos Pesigan
Estimate Improvement in R-Squared and Generate the Corresponding Sampling Distribution Using the Monte Carlo Method
DeltaRSqMC(object, alpha = c(0.05, 0.01, 0.001))
DeltaRSqMC(object, alpha = c(0.05, 0.01, 0.001))
object |
Object of class |
alpha |
Numeric vector.
Significance level |
The vector of improvement in R-squared
()
is derived from each randomly generated vector of parameter estimates.
Confidence intervals are generated by obtaining
percentiles corresponding to
from the generated sampling
distribution of
,
where
is the significance level.
Returns an object
of class betamc
which is a list with the following elements:
Function call.
Function arguments.
Sampling distribution of
.
Sampling variance-covariance matrix of
.
Vector of estimated
.
Function used ("DeltaRSqMC").
Ivan Jacob Agaloos Pesigan
Other Beta Monte Carlo Functions:
BetaMC()
,
DiffBetaMC()
,
MC()
,
MCMI()
,
PCorMC()
,
RSqMC()
,
SCorMC()
# 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 ) # DeltaRSqMC --------------------------------------------------------------- out <- DeltaRSqMC(mc, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(out) summary(out) coef(out) vcov(out) confint(out, level = 0.95)
# 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 ) # DeltaRSqMC --------------------------------------------------------------- out <- DeltaRSqMC(mc, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(out) summary(out) coef(out) vcov(out) confint(out, level = 0.95)
Estimate Differences of Standardized Slopes and Generate the Corresponding Sampling Distribution Using the Monte Carlo Method
DiffBetaMC(object, alpha = c(0.05, 0.01, 0.001))
DiffBetaMC(object, alpha = c(0.05, 0.01, 0.001))
object |
Object of class |
alpha |
Numeric vector.
Significance level |
The vector of differences of standardized regression slopes
is derived from each randomly generated vector of parameter estimates.
Confidence intervals are generated by obtaining
percentiles corresponding to
from the generated sampling
distribution of differences of standardized regression slopes,
where
is the significance level.
Returns an object
of class betamc
which is a list with the following elements:
Function call.
Function arguments.
Sampling distribution of differences of standardized regression slopes.
Sampling variance-covariance matrix of differences of standardized regression slopes.
Vector of estimated differences of standardized regression slopes.
Function used ("DiffBetaMC").
Ivan Jacob Agaloos Pesigan
Other Beta Monte Carlo Functions:
BetaMC()
,
DeltaRSqMC()
,
MC()
,
MCMI()
,
PCorMC()
,
RSqMC()
,
SCorMC()
# 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 ) # DiffBetaMC --------------------------------------------------------------- out <- DiffBetaMC(mc, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(out) summary(out) coef(out) vcov(out) confint(out, level = 0.95)
# 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 ) # DiffBetaMC --------------------------------------------------------------- out <- DiffBetaMC(mc, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(out) summary(out) coef(out) vcov(out) confint(out, level = 0.95)
Generate the Sampling Distribution of Regression Parameters Using the Monte Carlo Method
MC( object, R = 20000L, type = "hc3", g1 = 1, g2 = 1.5, k = 0.7, decomposition = "eigen", pd = TRUE, tol = 1e-06, fixed_x = FALSE, seed = NULL )
MC( object, R = 20000L, type = "hc3", g1 = 1, g2 = 1.5, k = 0.7, decomposition = "eigen", pd = TRUE, tol = 1e-06, fixed_x = FALSE, seed = NULL )
object |
Object of class |
R |
Positive integer. Number of Monte Carlo replications. |
type |
Character string.
Sampling covariance matrix type.
Possible values are
|
g1 |
Numeric.
|
g2 |
Numeric.
|
k |
Numeric.
Constant for |
decomposition |
Character string.
Matrix decomposition of the sampling variance-covariance matrix
for the data generation.
If |
pd |
Logical.
If |
tol |
Numeric.
Tolerance used for |
fixed_x |
Logical.
If |
seed |
Integer. Seed number for reproducibility. |
Let the parameter vector of the unstandardized regression model be given by
where is the vector of regression slopes,
is the error variance,
and
is the vector of unique elements
of the covariance matrix of the regressor variables.
The empirical sampling distribution
of
is generated using the Monte Carlo method,
that is, random values of parameter estimates
are sampled from the multivariate normal distribution
using the estimated parameter vector as the mean vector
and the specified sampling covariance matrix using the
type
argument
as the covariance matrix.
A replacement sampling approach is implemented
to ensure that the model-implied covariance matrix
is positive definite.
Returns an object
of class mc
which is a list with the following elements:
Function call.
Function arguments.
Processed lm
object.
Sampling variance-covariance matrix of parameter estimates.
Parameter estimates.
Sampling distribution of parameter estimates.
Function used ("MC").
Ivan Jacob Agaloos Pesigan
Dudgeon, P. (2017). Some improvements in confidence intervals for standardized regression coefficients. Psychometrika, 82(4), 928–951. doi:10.1007/s11336-017-9563-z
MacKinnon, D. P., Lockwood, C. M., & Williams, J. (2004). Confidence limits for the indirect effect: Distribution of the product and resampling methods. Multivariate Behavioral Research, 39(1), 99-128. doi:10.1207/s15327906mbr3901_4
Pesigan, I. J. A., & Cheung, S. F. (2023). Monte Carlo confidence intervals for the indirect effect with missing data. Behavior Research Methods. doi:10.3758/s13428-023-02114-4
Preacher, K. J., & Selig, J. P. (2012). Advantages of Monte Carlo confidence intervals for indirect effects. Communication Methods and Measures, 6(2), 77–98. doi:10.1080/19312458.2012.679848
Other Beta Monte Carlo Functions:
BetaMC()
,
DeltaRSqMC()
,
DiffBetaMC()
,
MCMI()
,
PCorMC()
,
RSqMC()
,
SCorMC()
# 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 ) mc # The `mc` object can be passed as the first argument # to the following functions # - BetaMC # - DeltaRSqMC # - DiffBetaMC # - PCorMC # - RSqMC # - SCorMC
# 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 ) mc # The `mc` object can be passed as the first argument # to the following functions # - BetaMC # - DeltaRSqMC # - DiffBetaMC # - PCorMC # - RSqMC # - SCorMC
Generate the Sampling Distribution of Regression Parameters Using the Monte Carlo Method for Data with Missing Values
MCMI( object, mi, R = 20000L, type = "hc3", g1 = 1, g2 = 1.5, k = 0.7, decomposition = "eigen", pd = TRUE, tol = 1e-06, fixed_x = FALSE, seed = NULL )
MCMI( object, mi, R = 20000L, type = "hc3", g1 = 1, g2 = 1.5, k = 0.7, decomposition = "eigen", pd = TRUE, tol = 1e-06, fixed_x = FALSE, seed = NULL )
object |
Object of class |
mi |
Object of class |
R |
Positive integer. Number of Monte Carlo replications. |
type |
Character string.
Sampling covariance matrix type.
Possible values are
|
g1 |
Numeric.
|
g2 |
Numeric.
|
k |
Numeric.
Constant for |
decomposition |
Character string.
Matrix decomposition of the sampling variance-covariance matrix
for the data generation.
If |
pd |
Logical.
If |
tol |
Numeric.
Tolerance used for |
fixed_x |
Logical.
If |
seed |
Integer. Seed number for reproducibility. |
Multiple imputation
is used to deal with missing values in a data set.
The vector of parameter estimates
and the corresponding sampling covariance matrix
are estimated for each of the imputed data sets.
Results are combined to arrive at the pooled vector of parameter estimates
and the corresponding sampling covariance matrix.
The pooled estimates are then used to generate the sampling distribution
of regression parameters.
See MC()
for more details on the Monte Carlo method.
Returns an object
of class mc
which is a list with the following elements:
Function call.
Function arguments.
Processed lm
object.
Sampling variance-covariance matrix of parameter estimates.
Parameter estimates.
Sampling distribution of parameter estimates.
Function used ("MCMI").
Ivan Jacob Agaloos Pesigan
Dudgeon, P. (2017). Some improvements in confidence intervals for standardized regression coefficients. Psychometrika, 82(4), 928–951. doi:10.1007/s11336-017-9563-z
MacKinnon, D. P., Lockwood, C. M., & Williams, J. (2004). Confidence limits for the indirect effect: Distribution of the product and resampling methods. Multivariate Behavioral Research, 39(1), 99-128. doi:10.1207/s15327906mbr3901_4
Pesigan, I. J. A., & Cheung, S. F. (2023). Monte Carlo confidence intervals for the indirect effect with missing data. Behavior Research Methods. doi:10.3758/s13428-023-02114-4
Preacher, K. J., & Selig, J. P. (2012). Advantages of Monte Carlo confidence intervals for indirect effects. Communication Methods and Measures, 6(2), 77–98. doi:10.1080/19312458.2012.679848
Other Beta Monte Carlo Functions:
BetaMC()
,
DeltaRSqMC()
,
DiffBetaMC()
,
MC()
,
PCorMC()
,
RSqMC()
,
SCorMC()
# Data --------------------------------------------------------------------- data("nas1982", package = "betaMC") nas1982_missing <- mice::ampute(nas1982)$amp # data set with missing values # Multiple Imputation mi <- mice::mice(nas1982_missing, m = 5, seed = 42, print = FALSE) # Fit Model in lm ---------------------------------------------------------- ## Note that this does not deal with missing values. ## The fitted model (`object`) is updated with each imputed data ## within the `MCMI()` function. object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982_missing) # Monte Carlo -------------------------------------------------------------- mc <- MCMI( object, mi = mi, R = 100, # use a large value e.g., 20000L for actual research seed = 0508 ) mc # The `mc` object can be passed as the first argument # to the following functions # - BetaMC # - DeltaRSqMC # - DiffBetaMC # - PCorMC # - RSqMC # - SCorMC
# Data --------------------------------------------------------------------- data("nas1982", package = "betaMC") nas1982_missing <- mice::ampute(nas1982)$amp # data set with missing values # Multiple Imputation mi <- mice::mice(nas1982_missing, m = 5, seed = 42, print = FALSE) # Fit Model in lm ---------------------------------------------------------- ## Note that this does not deal with missing values. ## The fitted model (`object`) is updated with each imputed data ## within the `MCMI()` function. object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982_missing) # Monte Carlo -------------------------------------------------------------- mc <- MCMI( object, mi = mi, R = 100, # use a large value e.g., 20000L for actual research seed = 0508 ) mc # The `mc` object can be passed as the first argument # to the following functions # - BetaMC # - DeltaRSqMC # - DiffBetaMC # - PCorMC # - RSqMC # - SCorMC
1982 National Academy of Sciences Doctoral Programs Data
nas1982
nas1982
Ratings of 46 doctoral programs in psychology in the USA with the following variables:
Program quality ratings.
Number of faculty members in the program.
Number of program graduates.
Percentage of program graduates who received support.
Percent of faculty members holding research grants.
Number of published articles attributed to program faculty member.
Percent of faculty with one or more published article.
National Research Council. (1982). An assessment of research-doctorate programs in the United States: Social and behavioral sciences. doi:10.17226/9781. Reproduced with permission from the National Academy of Sciences, Courtesy of the National Academies Press, Washington, D.C.
Estimate Squared Partial Correlation Coefficients and Generate the Corresponding Sampling Distribution Using the Monte Carlo Method
PCorMC(object, alpha = c(0.05, 0.01, 0.001))
PCorMC(object, alpha = c(0.05, 0.01, 0.001))
object |
Object of class |
alpha |
Numeric vector.
Significance level |
The vector of squared partial correlation coefficients
()
is derived from each randomly generated vector of parameter estimates.
Confidence intervals are generated by obtaining
percentiles corresponding to
from the generated sampling
distribution of
,
where
is the significance level.
Returns an object
of class betamc
which is a list with the following elements:
Function call.
Function arguments.
Sampling distribution of
.
Sampling variance-covariance matrix of
.
Vector of estimated
.
Function used ("PCorMC").
Ivan Jacob Agaloos Pesigan
Other Beta Monte Carlo Functions:
BetaMC()
,
DeltaRSqMC()
,
DiffBetaMC()
,
MC()
,
MCMI()
,
RSqMC()
,
SCorMC()
# 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 ) # PCorMC ------------------------------------------------------------------- out <- PCorMC(mc, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(out) summary(out) coef(out) vcov(out) confint(out, level = 0.95)
# 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 ) # PCorMC ------------------------------------------------------------------- out <- PCorMC(mc, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(out) summary(out) coef(out) vcov(out) confint(out, level = 0.95)
betamc
Print Method for an Object of Class
betamc
## S3 method for class 'betamc' print(x, alpha = NULL, digits = 4, ...)
## S3 method for class 'betamc' print(x, alpha = NULL, digits = 4, ...)
x |
Object of Class |
alpha |
Numeric vector.
Significance level |
digits |
Digits to print. |
... |
additional arguments. |
Prints a matrix of estimates, standard errors, number of Monte Carlo replications, and confidence intervals.
Ivan Jacob Agaloos Pesigan
mc
Print Method for an Object of Class mc
## S3 method for class 'mc' print(x, ...)
## S3 method for class 'mc' print(x, ...)
x |
Object of Class |
... |
additional arguments. |
Prints the first set of simulated parameter estimates and model-implied covariance matrix.
Ivan Jacob Agaloos Pesigan
object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982) mc <- MC(object, R = 100) print(mc)
object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982) mc <- MC(object, R = 100) print(mc)
Estimate Multiple Correlation Coefficients (R-Squared and Adjusted R-Squared) and Generate the Corresponding Sampling Distribution Using the Monte Carlo Method
RSqMC(object, alpha = c(0.05, 0.01, 0.001))
RSqMC(object, alpha = c(0.05, 0.01, 0.001))
object |
Object of class |
alpha |
Numeric vector.
Significance level |
R-squared () and
adjusted R-squared (
)
are derived from each randomly generated vector of parameter estimates.
Confidence intervals are generated by obtaining
percentiles corresponding to
from the generated sampling
distribution of
and
,
where
is the significance level.
Returns an object
of class betamc
which is a list with the following elements:
Function call.
Function arguments.
Sampling distribution of
and
.
Sampling variance-covariance matrix of
and
.
Vector of estimated
and
.
Function used ("RSqMC").
Ivan Jacob Agaloos Pesigan
Other Beta Monte Carlo Functions:
BetaMC()
,
DeltaRSqMC()
,
DiffBetaMC()
,
MC()
,
MCMI()
,
PCorMC()
,
SCorMC()
# 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 ) # RSqMC -------------------------------------------------------------------- out <- RSqMC(mc, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(out) summary(out) coef(out) vcov(out) confint(out, level = 0.95)
# 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 ) # RSqMC -------------------------------------------------------------------- out <- RSqMC(mc, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(out) summary(out) coef(out) vcov(out) confint(out, level = 0.95)
Estimate Semipartial Correlation Coefficients and Generate the Corresponding Sampling Distribution Using the Monte Carlo Method
SCorMC(object, alpha = c(0.05, 0.01, 0.001))
SCorMC(object, alpha = c(0.05, 0.01, 0.001))
object |
Object of class |
alpha |
Numeric vector.
Significance level |
The vector of semipartial correlation coefficients
()
is derived from each randomly generated vector of parameter estimates.
Confidence intervals are generated by obtaining
percentiles corresponding to
from the generated sampling
distribution of
,
where
is the significance level.
Returns an object
of class betamc
which is a list with the following elements:
Function call.
Function arguments.
Sampling distribution of
.
Sampling variance-covariance matrix of
.
Vector of estimated
.
Function used ("SCorMC").
Ivan Jacob Agaloos Pesigan
Other Beta Monte Carlo Functions:
BetaMC()
,
DeltaRSqMC()
,
DiffBetaMC()
,
MC()
,
MCMI()
,
PCorMC()
,
RSqMC()
# 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 ) # SCorMC ------------------------------------------------------------------- out <- SCorMC(mc, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(out) summary(out) coef(out) vcov(out) confint(out, level = 0.95)
# 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 ) # SCorMC ------------------------------------------------------------------- out <- SCorMC(mc, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(out) summary(out) coef(out) vcov(out) confint(out, level = 0.95)
betamc
Summary Method for an Object of Class
betamc
## S3 method for class 'betamc' summary(object, alpha = NULL, digits = 4, ...)
## S3 method for class 'betamc' summary(object, alpha = NULL, digits = 4, ...)
object |
Object of Class |
alpha |
Numeric vector.
Significance level |
digits |
Digits to print. |
... |
additional arguments. |
Returns a matrix of estimates, standard errors, number of Monte Carlo replications, and confidence intervals.
Ivan Jacob Agaloos Pesigan
mc
Summary Method for an Object of Class
mc
## S3 method for class 'mc' summary(object, digits = 4, ...)
## S3 method for class 'mc' summary(object, digits = 4, ...)
object |
Object of Class |
digits |
Digits to print. |
... |
additional arguments. |
Returns a list with the following elements:
Mean of the sampling distribution of
.
Variance of the sampling distribution of
.
Monte Carlo simulation bias.
Monte Carlo simulation root mean square error.
Location parameter used in the Monte Carlo simulation.
Scale parameter used in the Monte Carlo simulation.
Ivan Jacob Agaloos Pesigan
# Fit the regression model object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982) mc <- MC(object, R = 100) summary(mc)
# Fit the regression model object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982) mc <- MC(object, R = 100) summary(mc)
betamc
Sampling Variance-Covariance Matrix Method for an Object of Class
betamc
## S3 method for class 'betamc' vcov(object, ...)
## S3 method for class 'betamc' vcov(object, ...)
object |
Object of Class |
... |
additional arguments. |
Returns the variance-covariance matrix of estimates.
Ivan Jacob Agaloos Pesigan