Learn R Programming

GWRM (version 2.1.0.4)

predict.gw: GWRM Predictions

Description

Obtains predictions from a fitted GWRM object.

Usage

# S3 method for gw
predict(object = NULL, newdata = NULL, ...)

Arguments

object

a fitted object of class inheriting from "gw".

newdata

optionally, a data frame in which to look for variables with which to predict. If omitted, the fitted linear predictors are used.

...

further arguments passed to or from other methods.

Value

A data frame with newdata and their fitted means.

Examples

Run this code
# NOT RUN {
data(goals)
fit <- gw(goals ~ position, data = goals)
predict(fit)

# }

Run the code above in your browser using DataLab