predict.glmmadmb: Prediction for glmmADMB models

Description Usage Arguments Details Value Note Author(s) Examples

Description

Generates predicted values, standard errors and confidence intervals for glmmADMB fits

Usage

1
2
3
4
5
## S3 method for class 'glmmadmb'
predict(object,
 newdata = NULL, type = c("link", "response"),
  se.fit = FALSE, interval = c("none", "confidence"),
  random = ~0, level = 0.95, ...)

Arguments

object

A fitted model from glmmadmb

newdata

An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used.

type

Whether to return predictions on the scale of the linear predictor ("link") or the scale of the data ("response").

se.fit

A switch indicating if standard errors are required.

interval

What type of confidence intervals to return

random

Specification of random effects to use (STUB)

level

Tolerance/confidence level

...

further arguments passed to or from other methods.

Details

Produces predicted values from the model, based on evaluating the model with 'newdata' (if specified). If the logical 'se.fit' is 'TRUE', standard errors are calculated (this is only available on the link scale). It

Value

predict.lm produces a vector of predictions or a data frame of predictions and bounds with column names fit, lwr, and upr if interval is set. If se.fit is TRUE, a list with the components fit (vector or matrix as above) and se.fit (standard error of predicted means) is returned.

Note

Author(s)

Ben Bolker (partially copied from predict.lm)

Examples

1
2
3
4
5
6
getdata("OwlModel")
pp <- predict(OwlModel,interval="confidence",type="response")
pframe <- data.frame(obs=Owls$NegPerChick,pp)
with(pframe,plot(obs,fit,ylim=c(0,8)))
with(pframe,arrows(obs,lwr,obs,upr,length=0))
abline(a=0,b=1,col=2,lty=2) ## 1-to-1 line

bbolker/glmmadmb documentation built on May 11, 2019, 9:29 p.m.