fs_lmm: Create a data.frame that is ready for use in Freesufers...

Description Usage Arguments Value Examples

View source: R/fs_lmm.R

Description

fs_lmm Creates a data.frame of subsetted row and formatted columns ready for use in Freesurfers (6.0) linear mixed models. Design matrices are created for the grouping.var factors, and numeric variables are z-transformed.

Usage

1
2
fs_lmm(data, grouping.var, numeric.var, missing.action = "mean",
  keep = "long", file)

Arguments

data

The MOAS or a MOAS generated file.

grouping.var

String vector specifying the column names of categorical/ordinal factors.

numeric.var

A string vector of column names for numeric, scalar co-variates.

missing.action

Action to take on missing data for the numeric.vars. Options are: 'delete' - deletes observations with any missing numeric.vars, 'mean' - replaces missing with mean for that participant, 'all' - replaces all values with the mean for that participant, 'first' - replaced all values with the first observation for that participant.

keep

For double/triple scans, which data should be kept. option calls site_keeper.

file

Optional string specifying file name to be saved

Value

a data frame ready for Freesurfer LMM use.

Examples

1
2
3
4
5
6
## Not run: 
site_keeper(MOAS)
site_keeper(MOAS, "ousSkyra")
site_keeper(MOAS, "ousAvanto")

## End(Not run)

LCBC-UiO/MOAS documentation built on Dec. 21, 2018, 7:13 p.m.