rhglmm {hglmm}R Documentation

Simulate a data set from a hidden generalized linear Markov model.

Description

Generic function for simulating data from hidden generalized linear Markov models.

Usage

rhglmm(object, ...)

Arguments

object

Specification of the model from which to simulate data.

...

Other arguments to be passed to methods for this generic function.

Details

Although the name refers to “generalized linear models”, currently only log linear Poisson models are provided for. More flexibility may be added at a future date.

Value

A data frame with columns equal to the simulated observations and the factors specifying the hidden Markov model.

Author(s)

Rolf Turner r.turner@auckland.ac.nz

References

See the help for hglmm() for references.

See Also

fitted.hglmm() rhglmm.default() rhglmm.hglmm() bcov()

Examples

    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)
    obj <- list(tpm=matrix(c(0.91,0.09,0.36,0.64),byrow=TRUE,ncol=2),
                    phi=c(-0.34,0.03,-0.32,0.14,-0.05,-0.14,0.10,-1.83),
                    data=SCC4[,1:3])
    X   <- rhglmm(obj,formula=y~locn+depth+state,cells=c("locn","depth"),
                    miss.frac=0.75,contr="sum")

[Package hglmm version 0.0-14 Index]