Skip to contents

Run a single lme4::lmer model and extract stats

Usage

single_lmm(imp, y, formula, pvalues = TRUE)

Arguments

imp

: The phenotype dataset (in verywise format).

y

: A vector of outcome values (i.e. a single vertex from the supersubject matrix).

formula

: R formula describing the linear mixed model (using lme4 notation)

pvalues

: (default : TRUE) whether to include p-values computed using the *t-as-z* approach (see Details).

Value

A list with two elements:

  1. "stats": a dataframe with estimates, SEs and p-values for each fixed effect term)

  2. "resid": a vector of residuals for the given model.

Details

No additional parameters are currently passed to the lme4::lmer call P-values are estimated using the *t-as-z* approach at the moment. This is known to the anti-conservative for small sample sizes. However we preferred a relatively lenient (and computationally inexpensive) solution at this stage. We will be addressing Type I error mores strictly at the cluster forming stage.