R: Predictions at data locations from lattice-based...
predict.NparRegOut
R Documentation
Predictions at data locations from lattice-based non-parametric regression.
Description
Takes as input a NparRegOut object from the function createNparReg.
A vector of predicted values is produced corresponding to each location
in the data.
Usage
## S3 method for class 'NparRegOut'
predict(object,new.pred=NULL,...)
Arguments
object
an object of type NparRegOut returned by createNparReg.
new.pred
if new.pred is left out, predictions are made at the locations of
the point pattern. Otherwise, new.pred is a 2-column matrix of
locations where you wish to obtain predictions
...
aditionally arguments affecting the predictions, of which there
are none at this time.
Details
If new.pred is not used as an arguments, this function returns a vector
of predictions at each node closest to an observations of the original
point process. If you wish to make predictions at arbitrary locations,
let new.pred be a 2-column matrix of those locations. Note that all
predictions are actually at the nearest node to the desired locations.
NOTE: Like all functions in this package, new locations are relocated to the
nearest node in the region, even if they are outside the boundary. Thus you
should ensure that your locations of interest are inside the boundary and
that the density of nodes is high enough that the nearest node is close
enough to the location you queried.