fitted.hglmm {hglmm} | R Documentation |
Predicted values based on hidden generalized linear Markov model object.
## S3 method for class 'hglmm' fitted(object, ...)
object |
An object of class |
... |
Not used. |
Although this documentation refers to “generalized linear models”, currently only log linear Poisson models are provided for. More flexibility may be added at a future date.
A vector of fitted values of the same length as that of the
observed values (i.e. length equal to the row dimension of the
data frame to which the model was fitted. This data frame is
equal to object$data
but with repeated rows corresponding to
different states collapsed to a single row. The row dimension of
this data frame is thus nrow(object$data)/K
where K
is the number of states in the model. This data frame, with
columns cf
and state
omitted, is returned as an
attribute data
of the vector of fitted values.
Rolf Turner r.turner@auckland.ac.nz
See the help for hglmm()
for references.
rhglmm()
rhglmm.default()
rhglmm.hglmm()
bcov()
loc4 <- c("LngRf","BondiE","BondiOff","MlbrOff") SCC4 <- SydColCount[SydColCount$locn %in% loc4,] SCC4$locn <- factor(SCC4$locn) # Get rid of unused levels. rownames(SCC4) <- 1:nrow(SCC4) fit <- hglmm(y~locn+depth,data=SCC4,cells=c("locn","depth"), K=2,contr="sum",verb=TRUE) fv <- fitted(fit) with(attr(fv,"data"),plot(y[locn=="BondiOff" & depth=="40"], xlab="time",ylab="count")) with(attr(fv,"data"),lines(fv[locn=="BondiOff" & depth=="40"]))