addTest | R Documentation |
addTest
function will test for additive batch effects in the residuals for each feature after fitting a linear mixed effects model. Uses Kenward-Roger method for significance testing. Data should be in "long" format. Depends on lme4
and pbkrtest
packages.
addTest(idvar, batchvar, features, formula, ranef, data, verbose = TRUE)
idvar |
character string that specifies name of ID variable. ID variable can be factor, numeric, or character. |
batchvar |
character string that specifies name of the batch variable. Batch variable should be a factor. |
features |
character string that specifies names of the numeric feature variables, or the numeric indices of the corresponding columns. |
formula |
character string representing all fixed effects on the right side of the formula for the linear mixed effects model. This should be in the notation used by |
ranef |
character string representing formula for the random effects in the notation used by |
data |
name of the data frame that contains the variables above. Rows are different observations (subject/timepoints), columns are different variables. |
verbose |
prints messages. Logical |
A data frame of Kenward-Roger test results for each feature.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.