rhglmm.hglmm {hglmm} | R Documentation |
Given an object of class hglmm
simulates data from
the model specified by that object.
## S3 method for class 'hglmm' rhglmm(object, miss.frac = NULL, set.con = TRUE, ...)
object |
An object of class |
miss.frac |
Data will be randomly set equal
to |
set.con |
Logical scalar. Should the contrasts to use
when building the design matrix be set? You should probably
never set this to |
... |
Not used. |
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.
A data frame with the same columns as those of object$data
but with columns cf
and state
omitted and
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. The response column is replaced by the
simulated response. The name of the response is determined from
object$formula
.
Rolf Turner r.turner@auckland.ac.nz
See the help for hglmm()
for references.
fitted.hglmm()
rhglmm()
rhglmm.default()
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,SCC4,c("locn","depth"),K=2, contr="sum",verb=TRUE) Y <- rhglmm(fit)