ComputeFastSwE: ComputeFastSwE - a fast function to calculate errors via the...

Description Usage Arguments Examples

View source: R/ComputeFastSwE.R

Description

This function is used to quickly calculate error from a marginal model via a sandwich estimator. The function can handle a single block (i.e. repeated measure)

Usage

1
ComputeFastSwE(X, nested, Nelm, resid_map, npredictors, beta_map, adjustment)

Arguments

X

The predictor data recast as a matrix

nested

A vector denoting the blocks (i.e. groups) which are used to calculate variance separately if set to NULL will compute as if a single group

Nelm

An integer denoting the number of voxels/vertices

resid_map

The residuals from the estimated data fits, usually by lm.fit or lmfit

npredictors

The number of predictors in X

beta_map

The beta map from the estimated data fits, usually by lm.fit or lmfit

adjustment

The residuals will be adjusted according to the small sample size adjustment. Acceptable values are "HC2", "HC3", and NULL.

Examples

1
T_map <- ComputeFastSwE(X=external_df,nested=nested,Nelm=Nelm,resid_map=resid_map,npredictors=npredictors,beta_map=beta_map,adjustment=adjustment)

DCAN-Labs/MarginalModelCIFTI documentation built on Nov. 30, 2021, 3:40 p.m.