predict.ppmlasso: Prediction to new data from a fitted regularisation path

predict.ppmlassoR Documentation

Prediction to new data from a fitted regularisation path

Description

Given a fitted regularisation path produced by ppmlasso, this function will predict the intensity for a new set of data.

Usage

## S3 method for class 'ppmlasso'
predict(object, ..., newdata, interactions = NA)

Arguments

object

A fitted regularisation path produced by ppmlasso.

...

Additional arguments impacting the prediction calculations.

newdata

A data frame of new environmental data for which predicted intensities are computed.

interactions

A vector of point interactions for predictions of area-interaction models.

Value

A vector of predicted intensities corresponding to the environmental data provided in the newdata argument.

Author(s)

Ian W. Renner

See Also

ppmlasso for fitting a regularisation path of point process models.

Examples

data(BlueMountains)
sub.env = BlueMountains$env[BlueMountains$env$Y > 6270 & BlueMountains$env$X > 300,]
sub.euc = BlueMountains$eucalypt[BlueMountains$eucalypt$Y > 6270 & BlueMountains$eucalypt$X > 300,]
ppm.form = ~ poly(FC, TMP_MIN, TMP_MAX, RAIN_ANN, degree = 2, raw = TRUE)
ppm.fit  = ppmlasso(ppm.form, sp.xy = sub.euc, env.grid = sub.env, sp.scale = 1, n.fits = 20,
writefile = FALSE)
pred.mu  = predict(ppm.fit, newdata = sub.env)

ppmlasso documentation built on May 29, 2024, 7:12 a.m.