permutation_test_impl: Generates realisations of the permutational test statistic...

View source: R/RcppExports.R

permutation_test_implR Documentation

Generates realisations of the permutational test statistic distribution

Description

Generates realisations of the permutational test statistic distribution from a given matrix of permutations

Usage

permutation_test_impl(
  resids,
  tr_mat,
  xb,
  invS,
  family2,
  Z,
  weight,
  iter = 1000L,
  verbose = TRUE
)

Arguments

resids

A numeric vector of generalised residuals

tr_mat

A matrix. Each column is a new random treatment allocation with 1s (treatment group) and 0s (control group)

xb

A numeric vector of fitted linear predictors

invS

A matrix. If using the weighted statistic then it should be the inverse covariance matrix of the observations

family2

A string naming the link function

Z

A matrix with columns indicating cluster membership

weight

Logical value indicating whether to use the weighted statistic (TRUE) or the unweighted statistic (FALSE)

iter

Integer. Number of permutation test iterations.

verbose

Logical indicating whether to report detailed output

Value

A numeric vector of quasi-score test statistics for each of the permutations


crctStepdown documentation built on Sept. 14, 2023, 5:06 p.m.