Learn R Programming

wildrwolf (version 0.6.1)

run_fwer_sim: Family Wise Error Rate Simulations

Description

Run a MC simulation study on family-wise error rates (FWERs) for the Holm and Romano & Wolf Methods multiple hypothesis adjustment methods given true null effects

Usage

run_fwer_sim(
  n_sims = 100,
  rho = c(0, 0.25, 0.5, 0.75),
  seed = 114411,
  B = 499,
  N = 1000,
  s = 6,
  G = 20
)

Value

A data frame containing familiy wise rejection rates for uncorrected pvalues and corrected pvalues using Holm's and the Romano-Wolf method.

reject_5

The family wise rejection rate at a 5% level

reject_10

The family wise rejection rate at a 10% level

rho

The correlation between the outcome variables. See function argument`rho` for more information.

Arguments

n_sims

The number of Monte Carlo iterations. 100 by default.

rho

The correlation between the outcome variables. Vectorized c(0, 0.25, 0.5, .75) by default

seed

A random seed.

B

The number of bootstrap draws. 499 by default.

N

The number of observations. 1000 by default.

s

The number of dependent variables. 6 by default.

G

The number of clusters. If NULL, no clustering. 20 by default

Examples

Run this code
# \donttest{

# N, B, n_sims, chosen so that the example runs quicker
# for a higher quality simulation, increase all values
res <- run_fwer_sim(
  seed = 123,
  n_sims = 10,
  B = 199,
  N = 100,
  s = 10, 
  rho = 0
)

# }

Run the code above in your browser using DataLab