apply.designmatprocess: Preprocessing Input Data

View source: R/prepdesignmat.R

prep.designmatprocessR Documentation

Preprocessing Input Data

Description

Preprocessing Input Data

Usage

prep.designmatprocess(indata, fmla, version = 2, ...)

apply.designmatprocess(designmatprocess, indata)

unstandardise.designmatprocess(designmatprocess, indata)

Arguments

indata

Input dataframe to be processed.

fmla

A model formula (predictor side only).

designmatprocess

Are instructions for preprocessing input data, created by prep.designmatprocess()

stoponhighcorrelation

If TRUE the preparations for a design matrix will fail if correlations between covariates are higher than 0.75

data

Dataframe to be processed.

Details

The input data is turned into a design matrix using stats::model.matrix(). Each non-constant column is then centered and scaled.

Value

A special list containing parameters for applying a preprocessing step to data.

A design matrix.

The columns of indata before centering and scaling

Functions

  • prep.designmatprocess: Calculates the parameters required to build a centred and scaled design matrix from input data.

  • apply.designmatprocess: Builds a centred and scaled design matrix from input data.

  • unstandardise.designmatprocess: Uncentres and unscales already standardised data.


sustainablefarms/sflddata documentation built on April 19, 2022, 11:19 a.m.