GLMresponse objects for depmix models using
formulae and family objects.GLMresponse(formula, data=NULL, family=gaussian(), pstart=NULL,
fixed=NULL, prob=TRUE, ...)
## S3 method for class 'response':
getdf(object)formula.GLMresponse returns an object of class GLMresponse which
extends the response-class.
getdf returns the number of free parameters of a
response model.GLMresponse is the default driver for specifying response
distributions of depmix models. It uses the familiar formula
interface from glm to specify how responses depend on
covariates/predictors. Currently available options for the family argument are
binomial, gaussian, poisson, Gamma, and
multinomial. Except for the latter option, the
GLMresponse model is an interface to the glm functions of
which the functionality is used: predict, fit and density functions.
The multinomial model takes as link functions mlogit, the
default, and then uses functionality from the nnet package to
fit multinomial logistic models; it also takes identity as a
link function. The latter is typically faster and is hence preferred
when no covariates are present. Note that the sum constraint inherent
in such a model is automatically respected in the EM algorithm, but
must be supplied by the user in case of using Rdonlp optimization.
See the responses help page for examples.
makeDepmix has an example of specifying a model with a
multivariate normal response and an example of how to add a user-defined
response model, in particular an ex-gauss distribution used for the
speed data.