extractVars: Extract and order variables from formula

Description Usage Arguments Value Author(s) See Also Examples

View source: R/extractVars.R

Description

This is an internal function used within arfimaMLM and arfimaOLS. It is used to extract the variables marked with the suffixes .fd, .xdif, and .ydif from formula as well as .mean from ecmformula and create variable lists for the respective types of data manipulations.

Usage

1
extractVars(formula,ecmformula=NULL)

Arguments

formula

An object of the class "formula" that specifies a multilevel or a simple linear model. See lmer, lm, arfimaMLM, and arfimaOLS for details.

ecmformula

An object of the class "formula" that specifies a simple linear model. See lm, arfimaMLM, and arfimaOLS for details.

Value

The function returns a list of character vectors containing variable names selected for subsequent data manipulation:

mean

List of variables selected to calculate level means (i.e. variables originally augmented with suffixes .fd, .xdif, ydif, and .mean).

fd

List of variables selected for fractional differencing (i.e. variables originally augmented with suffixes .fd, and ydif).

xdif

List of variables originally augmented with the suffix .xdif.

xdif

List of variables originally augmented with the suffix .ydif.

Author(s)

Patrick Kraft

See Also

arfimaMLM, arfimaOLS, ArfimaMLM.

Examples

1
2
3
4
5
6
f1 <- y ~ x1.xdif + x2 + z1.fd + z2
f2 <- y.ydif ~ x1.xdif + x2 + z1.fd + z2.fd + (1+x1.xdif|time)
f3 <- y.mean ~ x1.mean

extractVars(formula = f1)
extractVars(formula = f2, ecmformula = f3)

ArfimaMLM documentation built on May 2, 2019, 2:18 a.m.