grouped_perm_glmm is a nonparametric test for linear
mixed-effects models. It assesses the significance of fixed-effect
coefficients by permutation, computing the null distribution of the
test statistic by randomly rearranging the outcome variable while
preserving the random-effects structure.
Arguments
- tbl
A data frame or tibble containing all model variables.
- formla
A formula with both fixed- and random-effects parts; passed directly to
lme4::lmer().- var_to_perm
Character. Name of the column to permute (typically the outcome variable).
- permNum
Integer. Number of permutations to generate. Default
1000.- seed
Integer. Random seed for reproducibility; passed to
base::set.seed(). Default42.
Value
A tibble with one row per fixed-effect term and columns:
termName of the regression term.
effectAlways
"fixed"(random-parameter rows are dropped).estimateEstimated coefficient.
statisticObserved t-statistic.
p.permPermutation p-value: proportion of permuted |statistics| >= |observed statistic|. Replaces the conventional
p.valuebecauselme4::lmerdoes not compute degrees of freedom or p-values by default. A value of0means no permuted statistic was as extreme; report asp < 1/permNum.