run_fwer_sim: Family Wise Error Rate Simulations

View source: R/rwolf_sim.R

run_fwer_simR Documentation

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
)

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

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.

Examples



# 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
)



wildrwolf documentation built on March 7, 2023, 5:37 p.m.