gppm: Define a Gaussian process panel model

Description Usage Arguments Details Value See Also Examples

Description

This function is used to specify a Gaussian process panel model (GPPM), which can then be fit using fit.GPPM.

Usage

1
gppm(mFormula, cFormula, myData, ID, DV, control = gppmControl())

Arguments

mFormula

character string. Contains the specification of the mean function. See details for more information.

cFormula

character string. Contains the specification of the covariance function. See details for more information.

myData

data frame. Contains the data to which the model is fitted. Must be in the long-format.

ID

character string. Contains the column label in myData which describes the subject ID.

DV

character string. Contains the column label in myData which contains the to be modeled variable.

control

object of class GPPMControl. Used for storing technical settings. Default should only be changed by advanced users. Generated via gppmControl.

Details

mFormula and cFormula contain the specification of the mean and the covariance function respectively. These formulas are defined using character strings. Within these strings there are four basic elements:

The gppm function automatically recognizes which part of the string refers to which elements. To be able to do this certain relatively common rules need to be followed:

Parameters: Parameters may not have the same name as any of the columns in myData to avoid confusing them with a reference to an observed variable. Furthermore, to avoid confusing them with functions, operators, or constants, parameter labels must always begin with a lower case letter and only contain letters and digits.

Functions and operators: All functions and operators that are supported by stan can be used; see http://mc-stan.org/users/documentation/ for a full list. In general, all basic operators and functions are supported.

References: A reference must be the same as one of the elements of the output of names(myData). For references, the same rules apply as for parameters. That is, the column names of myData may only contain letters and digits and must start with a letter.

Constants: Again, all constants that are supported by stan can be used and in general the constants are available by their usual name.

Value

A (unfitted) Gaussian process panel model, which is an object of class 'GPPM'

See Also

fit.GPPM for how to fit a GPPM

Examples

1
2
3
4
5
# Defintion of a latent growth curve model

data("demoLGCM")
lgcm <- gppm('muI+muS*t','varI+covIS*(t+t#)+varS*t*t#+(t==t#)*sigma',
        demoLGCM,'ID','y')

karchjd/gppm documentation built on May 27, 2019, 11:49 p.m.