Generates B number of parametric bootstrap samples using estimated parameters from the original sample data. data is referred to as the empirical distribution with the following distributional assumption $$ \hat{ F }_{ \mathcal{ N }_{k} \left( \boldsymbol{ \hat{ \mu } } \left( \boldsymbol{ \hat{ \theta } } \right) , \boldsymbol{ \hat{ \Sigma } } \left( \boldsymbol{ \hat{ \theta } } \right) \right) } . %(\#eq:boot-pb-mvn) $$ Bootstrap samples are generated from a multivariate normal distribution using the fitted model-implied mean vector and variance-covariance matrix.

pbmvn(
  n,
  muhatthetahat,
  Sigmahatthetahat,
  tol = 1e-06,
  empirical = FALSE,
  B = 2000L,
  par = FALSE,
  ncores = NULL,
  mc = TRUE,
  lb = FALSE,
  cl_eval = FALSE,
  cl_export = FALSE,
  cl_expr,
  cl_vars
)

Arguments

n

Integer. Sample size.

muhatthetahat

Vector. Mean vector as a function of estimated parameters or the fitted model-implied mean vector \( \boldsymbol{ \hat{ \mu } } \left( \boldsymbol{ \hat{ \theta } } \right) %(\#eq:boot-pb-mvn-mu) \) .

Sigmahatthetahat

Matrix. Variance-covariance matrix as a function of estimated parameters or the fitted model-implied variance-covariance matrix \( \boldsymbol{ \hat{ \Sigma } } \left( \boldsymbol{ \hat{ \theta } } \right) %(\#eq:boot-pb-mvn-Sigma) \) .

tol

Numeric. Tolerance (relative to largest variance) for numerical lack of positive-definiteness in Sigma.

empirical

Logical. If TRUE, mu and Sigma specify the empirical not population mean and covariance matrix.

B

Integer. Number of bootstrap samples.

par

Logical. If TRUE, use multiple cores. If FALSE, use lapply().

ncores

Integer. Number of cores to use if par = TRUE. If unspecified, defaults to detectCores() - 1.

mc

Logical. If TRUE, use parallel::mclapply(). If FALSE, use parallel::parLapply() or parallel::parLapplyLB(). Ignored if par = FALSE.

lb

Logical. If TRUE use parallel::parLapplyLB(). If FALSE, use parallel::parLapply(). Ignored if par = FALSE and mc = TRUE.

cl_eval

Logical. Execute parallel::clusterEvalQ() using cl_expr. Ignored if mc = TRUE.

cl_export

Logical. Execute parallel::clusterExport() using cl_vars. Ignored if mc = TRUE.

cl_expr

Expression. Expression passed to parallel::clusterEvalQ() Ignored if mc = TRUE.

cl_vars

Character vector. Names of objects to pass to parallel::clusterExport() Ignored if mc = TRUE.

Value

Returns a list of length B of parametric bootstrap samples.

Details

For more details and examples see the following vignettes:

Notes: Intro to NB

Notes: Intro to PB

References

Efron, B., & Tibshirani, R. J. (1993). An introduction to the bootstrap. New York, N.Y: Chapman & Hall.

Wikipedia: Bootstrapping (statistics)

See also

Other bootstrap functions: nb(), pbuniv()

Examples

B <- 5L Sigmahatthetahat <- matrix( data = c( 82.37344, 70.55922, 17.83930, 70.55922, 112.57145, -75.98558, 17.83930, -75.98558, 338.46263 ), nrow = 3 ) muhatthetahat <- c( 108.3060, 105.3324, 103.4009 ) Xstar <- pbmvn( n = 5, Sigmahatthetahat = Sigmahatthetahat, muhatthetahat = muhatthetahat, B = B ) str(Xstar)
#> List of 5 #> $ : num [1:5, 1:3] 96.6 94.9 119 125.5 95.8 ... #> ..- attr(*, "dimnames")=List of 2 #> .. ..$ : NULL #> .. ..$ : NULL #> $ : num [1:5, 1:3] 118 119 122 107 112 ... #> ..- attr(*, "dimnames")=List of 2 #> .. ..$ : NULL #> .. ..$ : NULL #> $ : num [1:5, 1:3] 127 119 111 118 111 ... #> ..- attr(*, "dimnames")=List of 2 #> .. ..$ : NULL #> .. ..$ : NULL #> $ : num [1:5, 1:3] 101 108 123 125 110 ... #> ..- attr(*, "dimnames")=List of 2 #> .. ..$ : NULL #> .. ..$ : NULL #> $ : num [1:5, 1:3] 112 112 108 115 120 ... #> ..- attr(*, "dimnames")=List of 2 #> .. ..$ : NULL #> .. ..$ : NULL