response {depmixS4} | R Documentation |
Create response
objects for depmix
models using
formulae and family objects.
GLMresponse(formula, data=NULL, family=gaussian(), pstart=NULL, fixed=NULL, prob=TRUE, ...) transInit(formula, nstates, data=NULL, family=multinomial(), pstart=NULL, fixed=NULL, prob=TRUE, ...) ## S4 method for signature 'response': getdf(object)
formula |
A model formula. |
nstates |
The number of states of the model. |
family |
A family object; currently only multinomial() and gaussian() are allowed options. |
data |
An optional data.frame to interpret the variables from the formula argument in. |
pstart |
Starting values for the coefficients and other parameters, ie the standard deviation for the gaussian() family. |
fixed |
Logical vector indicating which paramters are to be fixed. |
prob |
Logical indicating whether the starting values for multinomial() family models are probabilities or logistic parameters (see details). |
object |
Object of class response. |
... |
Not used currently. |
Both methods use the familiar formula interface from linear and general linear models to specify how responses (or transition or prior parameters) depend on covariates.
The GLMresponse model is an interface to the glm functions of which the functionality is leant, ie predict, fit and density functions.
The transInit response model provides functionality for multinomial responses that are currently fit using nnet (this may change in the future but this should not affect the interface of this function). Note that the transInit model actually lacks a reponse, ie the y-slot is empty, at the time of construction, as the transitions are not observed.
GLMresponse
and transInit
return objects of class
GLMresponse
and transInit
respectively; both classes
extend the response-class
.
getdf
returns the number of free parameters of a
response
model.
Maarten Speekenbrink & Ingmar Visser