Description Usage Arguments Details Value See Also Examples
This function is used to specify a Gaussian process panel model (GPPM),
which can then be fit using fit.GPPM
.
1 | gppm(mFormula, cFormula, myData, ID, DV, control = gppmControl())
|
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 |
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:
Parameters
Functions and operators
References to observed variables in the data frame myData
Mathematical constants
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.
A (unfitted) Gaussian process panel model, which is an object of class 'GPPM'
fit.GPPM
for how to fit a GPPM
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.