Given a point pattern and two spatial covariates
rho2hat(object, cov1, cov2, ..., method=c("ratio", "reweight"))
A point pattern (object of class "ppp"
),
a quadrature scheme (object of class "quad"
)
or a fitted point process model (object of class "ppm"
).
The two covariates.
Each argument is either a function(x,y)
or a pixel image (object of
class "im"
) providing the values of the covariate at any
location, or one of the strings "x"
or "y"
signifying the Cartesian coordinates.
Additional arguments passed to density.ppp
to smooth
the scatterplots.
Character string determining the smoothing method. See Details.
A pixel image (object of class "im"
). Also
belongs to the special class "rho2hat"
which has a plot method.
This is a bivariate version of rhohat
.
If object
is a point pattern, this command
produces a smoothed version of the scatterplot of
the values of the covariates cov1
and cov2
observed at the points of the point pattern.
The covariates cov1,cov2
must have continuous values.
If object
is a fitted point process model, suppose X
is
the original data point pattern to which the model was fitted. Then
this command assumes X
is a realisation of a Poisson point
process with intensity function of the form
object
, and
The method
determines how the density estimates will be
combined to obtain an estimate of
If method="ratio"
, then
If method="reweight"
, then
Baddeley, A., Chang, Y.-M., Song, Y. and Turner, R. (2012) Nonparametric estimation of the dependence of a point process on spatial covariates. Statistics and Its Interface 5 (2), 221--236.
# NOT RUN {
data(bei)
attach(bei.extra)
plot(rho2hat(bei, elev, grad))
fit <- ppm(bei, ~elev, covariates=bei.extra)
# }
# NOT RUN {
plot(rho2hat(fit, elev, grad))
# }
# NOT RUN {
plot(rho2hat(fit, elev, grad, method="reweight"))
# }
Run the code above in your browser using DataLab