pb.mvn: Parametric Bootstrapping Assuming Multivariate Normal...

Description Usage Arguments Author(s) See Also Examples

View source: R/pb.mvn.R

Description

Parametric Bootstrapping Assuming Multivariate Normal Distribution

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
pb.mvn(
  muthetahat,
  Sigmathetahat,
  n,
  std = FALSE,
  B = 5000,
  par = TRUE,
  ncores = NULL,
  blas_threads = TRUE,
  mc = TRUE,
  lb = FALSE
)

Arguments

muthetahat

Numeric vector. Model-implied mean vector \boldsymbol{μ} ≤ft( \boldsymbol{\hat{θ}} \right) .

Sigmathetahat

Numeric matrix. Model-implied variance-covariance matrix \boldsymbol{Σ} ≤ft( \boldsymbol{\hat{θ}} \right) .

n

Integer. Sample size.

std

Logical. Standardize the indirect effect \hat{α}^{\prime} \hat{β}^{\prime} = \hat{α} \hat{β} \frac{\hat{σ}_x}{\hat{σ}_y}.

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.

blas_threads

Logical. If TRUE, set BLAS threads using blas_set_num_threads(threads = blas_get_num_procs()). If FALSE, set BLAS threads using blas_set_num_threads(threads = 1). If par = TRUE, blas_threads is automatically set to FALSE to prevent conflicts in parallel processing. This argument is useful when FUN can handle implicit parallelism when par = FALSE, for example linear algebra operations.

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.

Author(s)

Ivan Jacob Agaloos Pesigan

See Also

Other parametric functions: beta_pb.beta_bcaci_simulation(), beta_pb.beta_bcaci_task(), beta_pb.beta_bcci_simulation(), beta_pb.beta_bcci_task(), beta_pb.beta_pcci_simulation(), beta_pb.beta_pcci_task(), beta_pb.beta_simulation(), beta_pb.beta_task(), beta_pb.beta(), beta_pb.mvn_bcaci_simulation(), beta_pb.mvn_bcaci_task(), beta_pb.mvn_bcci_simulation(), beta_pb.mvn_bcci_task(), beta_pb.mvn_pcci_simulation(), beta_pb.mvn_pcci_task(), beta_pb.mvn_simulation(), beta_pb.mvn_task(), beta_pb.mvn(), exp_pb.exp_bcaci_simulation(), exp_pb.exp_bcaci_task(), exp_pb.exp_bcci_simulation(), exp_pb.exp_bcci_task(), exp_pb.exp_pcci_simulation(), exp_pb.exp_pcci_task(), exp_pb.exp_simulation(), exp_pb.exp_task(), exp_pb.exp(), exp_pb.mvn_bcaci_simulation(), exp_pb.mvn_bcaci_task(), exp_pb.mvn_bcci_simulation(), exp_pb.mvn_bcci_task(), exp_pb.mvn_pcci_simulation(), exp_pb.mvn_pcci_task(), exp_pb.mvn_simulation(), exp_pb.mvn_task(), exp_pb.mvn(), mvn_mar_10_pb.mvn_bcci_simulation(), mvn_mar_10_pb.mvn_bcci_task(), mvn_mar_10_pb.mvn_pcci_simulation(), mvn_mar_10_pb.mvn_pcci_task(), mvn_mar_10_pb.mvn_simulation(), mvn_mar_10_pb.mvn_task(), mvn_mar_10_pb.mvn(), mvn_mar_20_pb.mvn_bcci_simulation(), mvn_mar_20_pb.mvn_bcci_task(), mvn_mar_20_pb.mvn_pcci_simulation(), mvn_mar_20_pb.mvn_pcci_task(), mvn_mar_20_pb.mvn_simulation(), mvn_mar_20_pb.mvn_task(), mvn_mar_20_pb.mvn(), mvn_mar_30_pb.mvn_bcci_simulation(), mvn_mar_30_pb.mvn_bcci_task(), mvn_mar_30_pb.mvn_pcci_simulation(), mvn_mar_30_pb.mvn_pcci_task(), mvn_mar_30_pb.mvn_simulation(), mvn_mar_30_pb.mvn_task(), mvn_mar_30_pb.mvn(), mvn_mcar_10_pb.mvn_bcci_simulation(), mvn_mcar_10_pb.mvn_bcci_task(), mvn_mcar_10_pb.mvn_pcci_simulation(), mvn_mcar_10_pb.mvn_pcci_task(), mvn_mcar_10_pb.mvn_simulation(), mvn_mcar_10_pb.mvn_task(), mvn_mcar_10_pb.mvn(), mvn_mcar_20_pb.mvn_bcci_simulation(), mvn_mcar_20_pb.mvn_bcci_task(), mvn_mcar_20_pb.mvn_pcci_simulation(), mvn_mcar_20_pb.mvn_pcci_task(), mvn_mcar_20_pb.mvn_simulation(), mvn_mcar_20_pb.mvn_task(), mvn_mcar_20_pb.mvn(), mvn_mcar_30_pb.mvn_bcci_simulation(), mvn_mcar_30_pb.mvn_bcci_task(), mvn_mcar_30_pb.mvn_pcci_simulation(), mvn_mcar_30_pb.mvn_pcci_task(), mvn_mcar_30_pb.mvn_simulation(), mvn_mcar_30_pb.mvn_task(), mvn_mcar_30_pb.mvn(), mvn_mnar_10_pb.mvn_bcci_simulation(), mvn_mnar_10_pb.mvn_bcci_task(), mvn_mnar_10_pb.mvn_pcci_simulation(), mvn_mnar_10_pb.mvn_pcci_task(), mvn_mnar_10_pb.mvn_simulation(), mvn_mnar_10_pb.mvn_task(), mvn_mnar_10_pb.mvn(), mvn_mnar_20_pb.mvn_bcci_simulation(), mvn_mnar_20_pb.mvn_bcci_task(), mvn_mnar_20_pb.mvn_pcci_simulation(), mvn_mnar_20_pb.mvn_pcci_task(), mvn_mnar_20_pb.mvn_simulation(), mvn_mnar_20_pb.mvn_task(), mvn_mnar_20_pb.mvn(), mvn_mnar_30_pb.mvn_bcci_simulation(), mvn_mnar_30_pb.mvn_bcci_task(), mvn_mnar_30_pb.mvn_pcci_simulation(), mvn_mnar_30_pb.mvn_pcci_task(), mvn_mnar_30_pb.mvn_simulation(), mvn_mnar_30_pb.mvn_task(), mvn_mnar_30_pb.mvn(), mvn_pb.mvn_bcaci_simulation(), mvn_pb.mvn_bcaci_task(), mvn_pb.mvn_bcci_simulation(), mvn_pb.mvn_bcci_task(), mvn_pb.mvn_pcci_simulation(), mvn_pb.mvn_pcci_task(), mvn_pb.mvn_simulation(), mvn_pb.mvn_task(), mvn_pb.mvn(), mvn_std_pb.mvn_bcaci_simulation(), mvn_std_pb.mvn_bcaci_task(), mvn_std_pb.mvn_bcci_simulation(), mvn_std_pb.mvn_bcci_task(), mvn_std_pb.mvn_pcci_simulation(), mvn_std_pb.mvn_pcci_task(), mvn_std_pb.mvn_simulation(), mvn_std_pb.mvn_task(), mvn_std_pb.mvn(), pb.beta(), pb.exp(), pb.vm(), vm_mod_pb.mvn_bcaci_simulation(), vm_mod_pb.mvn_bcaci_task(), vm_mod_pb.mvn_bcci_simulation(), vm_mod_pb.mvn_bcci_task(), vm_mod_pb.mvn_pcci_simulation(), vm_mod_pb.mvn_pcci_task(), vm_mod_pb.mvn_simulation(), vm_mod_pb.mvn_task(), vm_mod_pb.mvn(), vm_mod_pb.vm_bcaci_simulation(), vm_mod_pb.vm_bcaci_task(), vm_mod_pb.vm_bcci_simulation(), vm_mod_pb.vm_bcci_task(), vm_mod_pb.vm_pcci_simulation(), vm_mod_pb.vm_pcci_task(), vm_mod_pb.vm_simulation(), vm_mod_pb.vm_task(), vm_mod_pb.vm(), vm_mod_std_pb.mvn_bcaci_simulation(), vm_mod_std_pb.mvn_bcaci_task(), vm_mod_std_pb.mvn_bcci_simulation(), vm_mod_std_pb.mvn_bcci_task(), vm_mod_std_pb.mvn_pcci_simulation(), vm_mod_std_pb.mvn_pcci_task(), vm_mod_std_pb.mvn_simulation(), vm_mod_std_pb.mvn_task(), vm_mod_std_pb.mvn(), vm_sev_pb.mvn_bcaci_simulation(), vm_sev_pb.mvn_bcaci_task(), vm_sev_pb.mvn_bcci_simulation(), vm_sev_pb.mvn_bcci_task(), vm_sev_pb.mvn_pcci_simulation(), vm_sev_pb.mvn_pcci_task(), vm_sev_pb.mvn_simulation(), vm_sev_pb.mvn_task(), vm_sev_pb.mvn(), vm_sev_pb.vm_bcaci_simulation(), vm_sev_pb.vm_bcaci_task(), vm_sev_pb.vm_bcci_simulation(), vm_sev_pb.vm_bcci_task(), vm_sev_pb.vm_pcci_simulation(), vm_sev_pb.vm_pcci_task(), vm_sev_pb.vm_simulation(), vm_sev_pb.vm_task(), vm_sev_pb.vm(), vm_sev_std_pb.mvn_bcaci_simulation(), vm_sev_std_pb.mvn_bcaci_task(), vm_sev_std_pb.mvn_bcci_simulation(), vm_sev_std_pb.mvn_bcci_task(), vm_sev_std_pb.mvn_pcci_simulation(), vm_sev_std_pb.mvn_pcci_task(), vm_sev_std_pb.mvn_simulation(), vm_sev_std_pb.mvn_task(), vm_sev_std_pb.mvn()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
muthetahat <- mutheta(
  mux = 70.18000,
  deltam = 26.82246,
  deltay = 29.91071,
  taudot = 0.207648,
  beta = 0.451039,
  alpha = 0.338593
)
Sigmathetahat <- Sigmatheta(
  taudot = 0.207648,
  beta = 0.451039,
  alpha = 0.338593,
  sigma2x = 1.293469,
  sigma2epsilonm = 0.9296691,
  sigma2epsilony = 0.9310597
)

# Unstandardized -------------------------------------------------------------
thetahatstar <- pb.mvn(
  mutheta = muthetahat, Sigmatheta = Sigmathetahat, n = 50, B = 5000, par = FALSE
)
hist(thetahatstar)

# Standardized ---------------------------------------------------------------
thetahatstar <- pb.mvn(
  mutheta = muthetahat, Sigmatheta = Sigmathetahat, n = 50, std = TRUE, B = 5000, par = FALSE
)
hist(thetahatstar)

jeksterslabds/jeksterslabRmedsimple documentation built on Oct. 16, 2020, 11:30 a.m.