Learn R Programming

zebu (version 0.1.3.0)

permtest: Permutation test for local and global association measures

Description

Permutation test: statistical significance of local and global association measures

Usage

permtest(
  x,
  group = as.list(colnames(x$data$pp)),
  nb = 1000L,
  p_adjust = "BH",
  progress_bar = FALSE
)

Arguments

x

lassie S3 object.

group

list of column names specifying which columns should be permuted together. This is useful for the multivariate case, for example, when there is many dependent variables and one independent variable. By default, permutes all columns separately.

nb

number of resampling iterations.

p_adjust

multiple testing correction method. (see p.adjust.methods for a list of methods).

progress_bar

logical specifying if progress bar should be displayed.

Value

permtest returns an S3 object of class lassie and permtest. Adds the following to the lassie object x:

  • global_p: global association p-value.

  • local_p: array of local association p-values.

  • global_perm: numeric global association values obtained with permutations.

  • local_perm: matrix local association values obtained with permutations. Column number correspond to positions in local association array after converting to numeric (e.g. local_perm[, 1] corresponds to local[1]).

  • perm_params: parameters used when calling permtest (nb and p_adjust).

See Also

lassie

Examples

Run this code
# NOT RUN {
# Calling lassie on cars dataset
las <- lassie(cars)

# Permutation test using default settings
permtest(las, nb = 30) # keep resampling low for example

# }

Run the code above in your browser using DataLab