Learn R Programming

spind (version 2.1.3)

predict.WRM: predict.WRM

Description

Model predictions for WRM

Usage

# S3 method for WRM
predict(object, ..., newdata, sm = FALSE, newcoord = NA)

Arguments

object

A model object of class WRM

...

Other arguments passed to predict

newdata

A data frame containing variables used to make predictions.

sm

Logical. Should part of smooth components be included?

newcoord

New coordinates corresponding to observations in newdata.

Value

A vector of predictions based on a user-specified model

Examples

Run this code
# NOT RUN {
data(musdata)
coords<- musdata[,4:5]

mwrm<-WRM(musculus ~ pollution + exposure, "poisson", musdata,
          coord=coords, level=1, plot=TRUE)
pred<-predict(mwrm,newdata=musdata)

# }

Run the code above in your browser using DataLab