Generates realisations of the permutational test statistic distribution from a given matrix of permutations
permutation_test_impl(
resids,
tr_mat,
xb,
invS,
family2,
Z,
weight,
iter = 1000L,
verbose = TRUE
)A numeric vector of quasi-score test statistics for each of the permutations
A numeric vector of generalised residuals
A matrix. Each column is a new random treatment allocation with 1s (treatment group) and 0s (control group)
A numeric vector of fitted linear predictors
A matrix. If using the weighted statistic then it should be the inverse covariance matrix of the observations
A string naming the link function
A matrix with columns indicating cluster membership
Logical value indicating whether to use the weighted statistic (TRUE) or the unweighted statistic (FALSE)
Integer. Number of permutation test iterations.
Logical indicating whether to report detailed output