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; using mlogit
as link allows
only n=1 models to be specified, i.e. a single observation for each
occasion; it also takes identity
as a link function. The latter
is typically faster and is hence preferred when no covariates are
present.
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.