jack: Jackknife Estimates of Indirect Effect for a Simple Mediation...

Description Usage Arguments Author(s) See Also Examples

View source: R/jack.R

Description

Jackknife Estimates of Indirect Effect for a Simple Mediation Model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
jack(
  data,
  std = FALSE,
  complete = TRUE,
  par = TRUE,
  ncores = NULL,
  blas_threads = TRUE,
  mc = TRUE,
  lb = FALSE
)

Arguments

data

n by 3 matrix or data frame. data[, 1] correspond to values for x. data[, 2] correspond to values for m. data[, 3] correspond to values for y.

std

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

complete

Logical. If TRUE, create complete data set before bootstrapping. If 'FALSE'' bootstrap incomplete data set and fit the model with FIML.

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 jackknife functions: beta_jack_simulation(), beta_jack_task(), beta_jack(), exp_jack_simulation(), exp_jack_task(), exp_jack(), mvn_jack_simulation(), mvn_jack_task(), mvn_jack(), mvn_std_jack_simulation(), mvn_std_jack_task(), mvn_std_jack(), vm_mod_jack_simulation(), vm_mod_jack_task(), vm_mod_jack(), vm_mod_std_jack_simulation(), vm_mod_std_jack_task(), vm_mod_std_jack(), vm_sev_jack_simulation(), vm_sev_jack_task(), vm_sev_jack(), vm_sev_std_jack_simulation(), vm_sev_std_jack_task(), vm_sev_std_jack()

Examples

1
2
3
data <- jeksterslabRdatarepo::thirst
jack(data, par = FALSE)
jack(data, std = TRUE, par = FALSE)

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