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,
  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

weight

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

verbose

Logical indicating whether to report detailed output

Value

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


samuel-watson/glmmr documentation built on July 27, 2022, 10:30 p.m.