bias.test.custom {GPvam} | R Documentation |
Permutation Tests for Fixed Effects Bias Assessment
Description
Performs permutation tests on fixed effects within a linear mixed model to assess the bias of fixed effect parameters or contrasts. The function allows for both standard basis vectors and custom vectors to define the effects being tested. See Karl and Zimmerman (2021) <doi:10.1016/j.jspi.2020.06.004>.
Usage
bias.test.custom(result,
k_vectors = NULL,
n_perms = 1e5)
Arguments
result |
An object containing GPvam results, including the fixed effects matrix (
|
k_vectors |
(Optional) A list of numeric vectors specifying custom |
n_perms |
(Optional) The number of permutations to perform for each |
Value
A list containing:
permutation_results |
A data frame with the following columns:
|
plot_list |
A list of ggplot2 objects for the permutation histograms. |
Examples
## Not run:
# Assuming 'result' is your GPvam object
# Perform bias test for all fixed effects
test_results <- bias.test.custom(result)
# Perform bias test including a custom contrast
k_custom <- c(1, -1, 0, 0) # Contrast between first and second fixed effects
test_results <- bias.test.custom(result, k_vectors = list(k_custom))
## End(Not run)