| Title: | Bootstrap for Regression Effect Sizes |
|---|---|
| Description: | Generates nonparametric bootstrap confidence intervals (Efron and Tibshirani, 1993: <doi:10.1201/9780429246593>) for standardized regression coefficients (beta) and other effect sizes, including multiple correlation, semipartial correlations, squared semipartial correlations, improvement in R-squared, squared partial correlations, Cohen's f-squared, and differences in standardized regression coefficients, for models fitted by lm(). Pairs and wild bootstrap samples are supported. |
| Authors: | Ivan Jacob Agaloos Pesigan [aut, cre, cph] (ORCID: <https://orcid.org/0000-0003-4818-8420>) |
| Maintainer: | Ivan Jacob Agaloos Pesigan <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.1.0 |
| Built: | 2026-12-04 06:39:47 UTC |
| Source: | https://github.com/jeksterslab/betaNB |
Estimate Standardized Regression Coefficients and Generate the Corresponding Sampling Distribution Using Nonparametric Bootstrapping
BetaNB(object, alpha = c(0.05, 0.01, 0.001), std_y = TRUE, std_x = NULL)BetaNB(object, alpha = c(0.05, 0.01, 0.001), std_y = TRUE, std_x = NULL)
object |
Object of class |
alpha |
Numeric vector.
Significance level |
std_y |
Logical.
Standardize |
std_x |
Character vector or |
The vector of standardized regression coefficients
()
is estimated from bootstrap samples.
Confidence intervals are the percentiles
corresponding to
of the sampling distribution of ,
where is the significance level.
Partition the covariance matrix of the outcome and the regressors as
The regression slopes and the standardized regression slopes are
where is the standard deviation of regressor .
With std_y = FALSE, is replaced by one;
for a regressor left out of std_x, is replaced by one.
The estimates are computed from the data,
the draws from each bootstrap
covariance matrix (see NB()),
and vcov is the sample covariance matrix of the draws.
Returns an object
of class betanb which is a list with the following elements:
Function call.
Function arguments.
Sampling distribution of
.
Jackknife estimates.
Sampling variance-covariance matrix of
.
Vector of estimated
.
Function used ("BetaNB").
Ivan Jacob Agaloos Pesigan
Efron, B., & Tibshirani, R. J. (1993). An introduction to the bootstrap. Chapman & Hall. doi:10.1201/9780429246593
Other Beta Nonparametric Bootstrap Functions:
DeltaRSqNB(),
DiffBetaNB(),
FSqNB(),
NB(),
PCorNB(),
RSqNB(),
SCorNB(),
SCorSqNB()
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # BetaNB ------------------------------------------------------------------- out <- BetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95)# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # BetaNB ------------------------------------------------------------------- out <- BetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95)
betanb
Estimated Parameter Method for an Object of Class betanb
## S3 method for class 'betanb' coef(object, ...)## S3 method for class 'betanb' coef(object, ...)
object |
Object of Class |
... |
additional arguments. |
Returns a vector of estimated parameters.
Ivan Jacob Agaloos Pesigan
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # BetaNB ------------------------------------------------------------------- out <- BetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- coef(object = out)# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # BetaNB ------------------------------------------------------------------- out <- BetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- coef(object = out)
betanb
Confidence Intervals Method for an Object of Class betanb
## S3 method for class 'betanb' confint(object, parm = NULL, level = 0.95, type = "pc", ...)## S3 method for class 'betanb' confint(object, parm = NULL, level = 0.95, type = "pc", ...)
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. |
type |
Character string.
Confidence interval type, that is,
|
... |
additional arguments. |
Let be the estimate,
the bootstrap
draws with empirical distribution function ,
the standard normal distribution function,
and .
The limits of a interval are
and
(type 7 quantiles of the draws).
The percentile interval (type = "pc") uses
and .
The bias-corrected interval (type = "bc") uses
where is the indicator function,
, and .
The bias-corrected and accelerated interval (type = "bca") uses
where is the jackknife estimate
without observation and
is their mean (Efron & Tibshirani, 1993).
Failed draws are dropped.
The modified percentile interval (type = "mpc") is described in
DeltaRSqNB().
Returns a matrix of confidence intervals.
Ivan Jacob Agaloos Pesigan
Efron, B., & Tibshirani, R. J. (1993). An introduction to the bootstrap. Chapman & Hall. doi:10.1201/9780429246593
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # BetaNB ------------------------------------------------------------------- out <- BetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- confint(object = out, level = 0.95)# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # BetaNB ------------------------------------------------------------------- out <- BetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- confint(object = out, level = 0.95)
Estimate Improvement in R-Squared and Generate the Corresponding Sampling Distribution Using Nonparametric Bootstrapping
DeltaRSqNB(object, alpha = c(0.05, 0.01, 0.001), adj = FALSE)DeltaRSqNB(object, alpha = c(0.05, 0.01, 0.001), adj = FALSE)
object |
Object of class |
alpha |
Numeric vector.
Significance level |
adj |
Logical. Use differences in adjusted R-squared.
Default |
The vector of improvement in R-squared ()
is estimated from bootstrap samples.
Confidence intervals are the percentiles
corresponding to
of the sampling distribution of ,
where is the significance level.
With adj = TRUE, estimates and draws are differences between the
adjusted R-squared values of the full model and the model without
each regressor. The population target remains the unadjusted increment.
Negative adjusted estimates and draws are retained.
With type = "mpc" in confint() or summary(), an unadjusted
lower limit is set to zero when the sample F test is nonsignificant.
For adjusted estimates, a nonpositive percentile lower limit becomes
.001 if significant, or zero if nonsignificant; positive lower
limits are retained. Upper limits are unchanged, without clipping.
Both modes use the unadjusted sample F statistic and test at the
interval's error probability alpha (equality is nonsignificant).
These lower-limit rules follow Algina et al. (2007, p. 210; 2008a, pp. 3–5; 2008b, pp. 735, 737; 2010, pp. 928–929, 931–932). Unlike their ranked endpoints, betaNB retains its ordinary interpolated percentile calculation. Their studies used pairs resampling; coverage for wild draws or heteroskedastic F testing is not established by those studies.
Let be the vector of standardized slopes,
the correlation matrix of the regressors,
the th diagonal element of ,
and .
The semipartial correlation of regressor is
where is the R-squared from regressing regressor
on the other regressors.
Its square, , is the change in when regressor
is added last.
Because , shrinks
toward zero
as regressor becomes more redundant with the other regressors.
The improvement in R-squared for regressor is
Each effect size is computed from every bootstrap sample
(see NB()), and the confidence intervals are percentile-based.
Returns an object
of class betanb which is a list with the following elements:
Function call.
Function arguments.
Sampling distribution of
.
Sampling variance-covariance matrix of
.
Vector of estimated
.
Estimator label: "DeltaRSqNB" or "DeltaRSqAdjNB".
Ivan Jacob Agaloos Pesigan
Algina, J., Keselman, H. J., & Penfield, R. D. (2007). Confidence intervals for an effect size measure in multiple linear regression. Educational and Psychological Measurement, 67(2), 207–218. doi:10.1177/0013164406292030
Algina, J., Keselman, H. J., & Penfield, R. D. (2008a). Confidence intervals for the squared multiple semipartial correlation coefficient. Journal of Modern Applied Statistical Methods, 7(1), 2–10. doi:10.22237/jmasm/1209614460
Algina, J., Keselman, H. J., & Penfield, R. D. (2008b). Note on a confidence interval for the squared semipartial correlation coefficient. Educational and Psychological Measurement, 68(5), 734–741. doi:10.1177/0013164407313371
Algina, J., Keselman, H. J., & Penfield, R. D. (2010). Confidence intervals for squared semipartial correlation coefficients: The effect of nonnormality. Educational and Psychological Measurement, 70(6), 926–940. doi:10.1177/0013164410379335
Other Beta Nonparametric Bootstrap Functions:
BetaNB(),
DiffBetaNB(),
FSqNB(),
NB(),
PCorNB(),
RSqNB(),
SCorNB(),
SCorSqNB()
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # DeltaRSqNB --------------------------------------------------------------- out <- DeltaRSqNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95) confint(object = out, level = 0.95, type = "mpc") adjusted <- DeltaRSqNB(object = nb, alpha = 0.05, adj = TRUE) confint(object = adjusted, level = 0.95, type = "mpc")# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # DeltaRSqNB --------------------------------------------------------------- out <- DeltaRSqNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95) confint(object = out, level = 0.95, type = "mpc") adjusted <- DeltaRSqNB(object = nb, alpha = 0.05, adj = TRUE) confint(object = adjusted, level = 0.95, type = "mpc")
Estimate Differences of Standardized Regression Coefficients and Generate the Corresponding Sampling Distribution Using Nonparametric Bootstrapping
DiffBetaNB(object, alpha = c(0.05, 0.01, 0.001))DiffBetaNB(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 estimated from bootstrap samples.
Confidence intervals are the percentiles
corresponding to
of the sampling distribution of the differences,
where is the significance level.
For every pair of regressors ,
the difference of the standardized regression slopes (see BetaNB()) is
computed from the data for the estimate
and from each bootstrap sample (see NB()) for the draws.
Returns an object
of class betanb 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 ("DiffBetaNB").
Ivan Jacob Agaloos Pesigan
Other Beta Nonparametric Bootstrap Functions:
BetaNB(),
DeltaRSqNB(),
FSqNB(),
NB(),
PCorNB(),
RSqNB(),
SCorNB(),
SCorSqNB()
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # DiffBetaNB --------------------------------------------------------------- out <- DiffBetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95)# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # DiffBetaNB --------------------------------------------------------------- out <- DiffBetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95)
Estimate Cohen's f-Squared and Local f-Squared and Generate the Corresponding Sampling Distribution Using Nonparametric Bootstrapping
FSqNB(object, alpha = c(0.05, 0.01, 0.001))FSqNB(object, alpha = c(0.05, 0.01, 0.001))
object |
Object of class |
alpha |
Numeric vector.
Significance level |
Let be the vector of standardized slopes,
the correlation matrix of the regressors,
the th diagonal element of ,
and .
The semipartial correlation of regressor is
where is the R-squared from regressing regressor
on the other regressors.
Its square, , is the change in when regressor
is added last.
Because , shrinks
toward zero
as regressor becomes more redundant with the other regressors.
Cohen's f-squared and the local f-squared of regressor are
By convention (Cohen, 1988), values of about 0.02, 0.15, and 0.35 are small,
medium, and large effects.
Each effect size is computed from every bootstrap sample
(see NB()), and the confidence intervals are percentile-based.
Returns an object
of class betanb which is a list with the following elements:
Function call.
Function arguments.
Sampling distribution of
(column fsq) and the local
(one column per regressor).
Jackknife estimates.
Sampling variance-covariance matrix.
Vector of estimates.
Function used ("FSqNB").
Ivan Jacob Agaloos Pesigan
Selya, A. S., Rose, J. S., Dierker, L. C., Hedeker, D., & Mermelstein, R. J. (2012). A practical guide to calculating Cohen's f2, a measure of local effect size, from PROC MIXED. Frontiers in Psychology, 3, 111. doi:10.3389/fpsyg.2012.00111
Other Beta Nonparametric Bootstrap Functions:
BetaNB(),
DeltaRSqNB(),
DiffBetaNB(),
NB(),
PCorNB(),
RSqNB(),
SCorNB(),
SCorSqNB()
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # FSqNB -------------------------------------------------------------------- out <- FSqNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95)# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # FSqNB -------------------------------------------------------------------- out <- FSqNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95)
1982 National Academy of Sciences Doctoral Programs Data
nas1982nas1982
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.
Generate the Sampling Distribution of Sample Covariances Using Nonparametric Bootstrapping
NB( object, R = 5000L, seed = NULL, type = c("pairs", "wild"), weights = c("rademacher", "mammen", "webb", "normal"), hc = c("hc3", "hc0", "hc1", "hc2", "hc4", "hc4m", "hc5"), x = c("random", "fixed") )NB( object, R = 5000L, seed = NULL, type = c("pairs", "wild"), weights = c("rademacher", "mammen", "webb", "normal"), hc = c("hc3", "hc0", "hc1", "hc2", "hc4", "hc4m", "hc5"), x = c("random", "fixed") )
object |
Object of class |
R |
Positive integer. Number of bootstrap replications. |
seed |
Integer. Seed number for reproducibility. |
type |
Character string.
Bootstrap sampler.
|
weights |
Character string.
Distribution of |
hc |
Character string.
Adjustment of the residuals,
with the same definitions as the heteroskedasticity-consistent
sampling covariance matrices of |
x |
Character string.
|
Let , , be the outcome and the regressors
of observation .
With type = "pairs", bootstrap sample draws
rows
with replacement, and its sample covariance matrix is
With type = "wild", the outcome is generated as described in type,
and is computed in the same way.
Row of thetahatstar is
.
Row of jackknife is
,
the sample covariance matrix without observation ,
which gives the acceleration of the bias-corrected and accelerated
intervals (see summary.betanb()).
An effect size is
computed from every ,
which gives its sampling distribution
.
Returns an object
of class nb which is a list with the following elements:
Function call.
Function arguments.
Processed lm object.
Sampling distribution of sample covariances (a matrix; each row is the half-vectorization of one bootstrap covariance matrix).
Jackknife estimates (a matrix; each row is the half-vectorization of one leave-one-out covariance matrix).
Effect sizes of the bootstrap samples (a list of matrices).
Effect sizes of the jackknife samples (a list of matrices).
Ivan Jacob Agaloos Pesigan
Efron, B., & Tibshirani, R. J. (1993). An introduction to the bootstrap. Chapman & Hall. doi:10.1201/9780429246593
Other Beta Nonparametric Bootstrap Functions:
BetaNB(),
DeltaRSqNB(),
DiffBetaNB(),
FSqNB(),
PCorNB(),
RSqNB(),
SCorNB(),
SCorSqNB()
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 20000L for actual research seed = 0508 ) nb # The `nb` object can be passed as the first argument # to the following functions # - BetaNB # - DeltaRSqNB # - DiffBetaNB # - PCorNB # - RSqNB # - SCorNB# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 20000L for actual research seed = 0508 ) nb # The `nb` object can be passed as the first argument # to the following functions # - BetaNB # - DeltaRSqNB # - DiffBetaNB # - PCorNB # - RSqNB # - SCorNB
Estimate Squared Partial Correlation Coefficients and Generate the Corresponding Sampling Distribution Using Nonparametric Bootstrapping
PCorNB(object, alpha = c(0.05, 0.01, 0.001))PCorNB(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 estimated from bootstrap samples.
Confidence intervals are the percentiles
corresponding to
of the sampling distribution of ,
where is the significance level.
Let be the vector of standardized slopes,
the correlation matrix of the regressors,
the th diagonal element of ,
and .
The semipartial correlation of regressor is
where is the R-squared from regressing regressor
on the other regressors.
Its square, , is the change in when regressor
is added last.
Because , shrinks
toward zero
as regressor becomes more redundant with the other regressors.
The squared partial correlation is
the proportion of the variance in the outcome not explained by the other
regressors
that is explained by regressor .
Each effect size is computed from every bootstrap sample
(see NB()), and the confidence intervals are percentile-based.
Returns an object
of class betanb 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 ("PCorNB").
Ivan Jacob Agaloos Pesigan
Other Beta Nonparametric Bootstrap Functions:
BetaNB(),
DeltaRSqNB(),
DiffBetaNB(),
FSqNB(),
NB(),
RSqNB(),
SCorNB(),
SCorSqNB()
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # PCorNB ------------------------------------------------------------------- out <- PCorNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95)# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # PCorNB ------------------------------------------------------------------- out <- PCorNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95)
betanb
Print Method for an Object of Class betanb
## S3 method for class 'betanb' print(x, alpha = NULL, type = "pc", digits = 4, ...)## S3 method for class 'betanb' print(x, alpha = NULL, type = "pc", digits = 4, ...)
x |
Object of Class |
alpha |
Numeric vector.
Significance level |
type |
Character string.
Confidence interval type, that is,
|
digits |
Digits to print. |
... |
additional arguments. |
Prints a matrix of estimates, standard errors, number of bootstrap replications, and confidence intervals.
Ivan Jacob Agaloos Pesigan
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # BetaNB ------------------------------------------------------------------- out <- BetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out)# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # BetaNB ------------------------------------------------------------------- out <- BetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out)
nb
Print Method for an Object of Class nb
## S3 method for class 'nb' print(x, ...)## S3 method for class 'nb' print(x, ...)
x |
Object of Class |
... |
additional arguments. |
Prints the first six bootstrap covariance matrices.
Ivan Jacob Agaloos Pesigan
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) print(x = nb)# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) print(x = nb)
Estimate R-Squared and Adjusted R-Squared and Generate the Corresponding Sampling Distribution Using Nonparametric Bootstrapping
RSqNB(object, alpha = c(0.05, 0.01, 0.001))RSqNB(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 estimated from bootstrap samples.
Confidence intervals are the percentiles
corresponding to
of the sampling distribution of and ,
where is the significance level.
Let be the vector of standardized slopes,
the correlation matrix of the regressors,
the th diagonal element of ,
and .
The R-squared and the adjusted R-squared are
where is the sample size and is the number of parameters
in the regression model, including the intercept.
Each effect size is computed from every bootstrap sample
(see NB()), and the confidence intervals are percentile-based.
Returns an object
of class betanb 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 ("RSqNB").
Ivan Jacob Agaloos Pesigan
Other Beta Nonparametric Bootstrap Functions:
BetaNB(),
DeltaRSqNB(),
DiffBetaNB(),
FSqNB(),
NB(),
PCorNB(),
SCorNB(),
SCorSqNB()
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # RSqNB -------------------------------------------------------------------- out <- RSqNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95)# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # RSqNB -------------------------------------------------------------------- out <- RSqNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95)
Estimate Semipartial Correlation Coefficients and Generate the Corresponding Sampling Distribution Using Nonparametric Bootstrapping
SCorNB(object, alpha = c(0.05, 0.01, 0.001))SCorNB(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 estimated from bootstrap samples.
Confidence intervals are the percentiles
corresponding to
of the sampling distribution of ,
where is the significance level.
Let be the vector of standardized slopes,
the correlation matrix of the regressors,
the th diagonal element of ,
and .
The semipartial correlation of regressor is
where is the R-squared from regressing regressor
on the other regressors.
Its square, , is the change in when regressor
is added last.
Because , shrinks
toward zero
as regressor becomes more redundant with the other regressors.
The sign of follows the sign of .
Each effect size is computed from every bootstrap sample
(see NB()), and the confidence intervals are percentile-based.
Returns an object
of class betanb 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 ("SCorNB").
Ivan Jacob Agaloos Pesigan
Other Beta Nonparametric Bootstrap Functions:
BetaNB(),
DeltaRSqNB(),
DiffBetaNB(),
FSqNB(),
NB(),
PCorNB(),
RSqNB(),
SCorSqNB()
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # SCorNB ------------------------------------------------------------------- out <- SCorNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95)# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # SCorNB ------------------------------------------------------------------- out <- SCorNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- print(x = out) summary(object = out) coef(object = out) vcov(object = out) confint(object = out, level = 0.95)
Square the signed interval as a set, with lower limit zero if it contains zero. This differs from an interval of squared draws. No draws are generated and no endpoints are clipped to one. Failed signed endpoints remain missing.
SCorSqNB(object, level = 0.95, type = "pc")SCorSqNB(object, level = 0.95, type = "pc")
object |
Context accepted by |
level |
Single confidence level in (0, 1). |
type |
Signed bootstrap interval: pc, bc, or bca. |
The semipartial correlation (see SCorNB()) is signed,
and its confidence interval may contain zero.
The interval for is the image of that interval under
squaring.
The squared interval is
if ,
if ,
and
if the signed interval contains zero.
This is not the interval of squared draws, and it is not an interval for
DeltaRSqNB().
Data frame with est, lower and upper columns and predictor row names. The point estimate is the squared signed estimate. No standard error is implied by this interval transformation.
Ivan Jacob Agaloos Pesigan
Other Beta Nonparametric Bootstrap Functions:
BetaNB(),
DeltaRSqNB(),
DiffBetaNB(),
FSqNB(),
NB(),
PCorNB(),
RSqNB(),
SCorNB()
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # SCorSqNB ----------------------------------------------------------------- SCorSqNB(object = nb, level = 0.95, type = "pc")# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # SCorSqNB ----------------------------------------------------------------- SCorSqNB(object = nb, level = 0.95, type = "pc")
betanb
Summary Method for an Object of Class betanb
## S3 method for class 'betanb' summary(object, alpha = NULL, type = "pc", digits = 4, ...)## S3 method for class 'betanb' summary(object, alpha = NULL, type = "pc", digits = 4, ...)
object |
Object of Class |
alpha |
Numeric vector.
Significance level |
type |
Character string.
Confidence interval type, that is,
|
digits |
Digits to print. |
... |
additional arguments. |
Let be the estimate,
the bootstrap
draws with empirical distribution function ,
the standard normal distribution function,
and .
The limits of a interval are
and
(type 7 quantiles of the draws).
The percentile interval (type = "pc") uses
and .
The bias-corrected interval (type = "bc") uses
where is the indicator function,
, and .
The bias-corrected and accelerated interval (type = "bca") uses
where is the jackknife estimate
without observation and
is their mean (Efron & Tibshirani, 1993).
Failed draws are dropped.
The modified percentile interval (type = "mpc") is described in
DeltaRSqNB().
Returns a matrix of estimates, standard errors, number of bootstrap replications, and confidence intervals.
Ivan Jacob Agaloos Pesigan
Efron, B., & Tibshirani, R. J. (1993). An introduction to the bootstrap. Chapman & Hall. doi:10.1201/9780429246593
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # BetaNB ------------------------------------------------------------------- out <- BetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- summary(object = out)# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # BetaNB ------------------------------------------------------------------- out <- BetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- summary(object = out)
betanb
Sampling Variance-Covariance Matrix Method for an Object of Class betanb
## S3 method for class 'betanb' vcov(object, ...)## S3 method for class 'betanb' vcov(object, ...)
object |
Object of Class |
... |
additional arguments. |
Returns the variance-covariance matrix of estimates.
Ivan Jacob Agaloos Pesigan
# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # BetaNB ------------------------------------------------------------------- out <- BetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- vcov(object = out)# Data --------------------------------------------------------------------- data("nas1982", package = "betaNB") # Fit Model in lm ---------------------------------------------------------- object <- stats::lm( formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982 ) # NB ----------------------------------------------------------------------- nb <- NB( object = object, R = 100, # use a large value e.g., 5000L for actual research seed = 0508 ) # BetaNB ------------------------------------------------------------------- out <- BetaNB(object = nb, alpha = 0.05) ## Methods ----------------------------------------------------------------- vcov(object = out)