vertexLmerEstimateDF: Estimate the degrees of freedom for parameters in a...

View source: R/minc_vertex_statistics.R

vertexLmerEstimateDFR Documentation

Estimate the degrees of freedom for parameters in a vertexLmer model

Description

There is much uncertainty in how to compute p-values for mixed-effects statistics, related to the correct calculation of the degrees of freedom of the model (see here http://glmm.wikidot.com/faq#df). mincLmer by default does not return the degrees of freedom as part of its model, instead requiring an explicit call to a separate function (such as this one). The implementation here is the Satterthwaite approximation. This approximation is computed from the data, to avoid the significant run-time requirement of computing it separate for every vertex, here it is only computed on a small number of vertices within the mask and the median DF returned for every variable.

Usage

vertexLmerEstimateDF(model, column = 1)

Arguments

model

the output of mincLmer

column

Which column to treat as the input from vertex files.

Value

the same mincLmer model, now with degrees of freedom set

See Also

mincLmer for mixed effects modelling, mincFDR for multiple comparisons corrections.

Examples

## Not run: 
vs <- mincLmer(filenames ~ age + sex + (age|id), data=gf, mask="mask.mnc")
vs <- mincLmerEstimateDF(vs)
qvals <- mincFDR(vs, mask=attr(vs, "mask"))
qvals

## End(Not run)

Mouse-Imaging-Centre/RMINC documentation built on Nov. 12, 2022, 1:50 p.m.