Generates the quasi-score statistic for a generalised linear mixed model
qscore_impl(resids, tr, xb, invS, family2, Z, weight = TRUE)A scalar value with the value of the statistic
A numeric vector of generalised residuals
A numeric vector of 1s (treatment group) and -1s (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)