Last chance! 50% off unlimited learning
Sale ends in
"rhohat"
.## S3 method for class 'rhohat':
print(x, ...)
## S3 method for class 'rhohat':
plot(x, ..., do.rug=TRUE)
## S3 method for class 'rhohat':
predict(object, ..., relative=FALSE)
"rhohat"
representing
a smoothed estimate of the intensity function of a point process.relative=FALSE
)
or the relative risk (relative=TRUE
) in the case
of a relative risk estimate.predict.rhohat
the value is a pixel image
(object of class "im"
).
For other functions, the value is NULL
.print
,
plot
and
predict
for the class "rhohat"
. An object of class "rhohat"
is an estimate
of the intensity of a point process, as a function of a
given spatial covariate. See rhohat
.
The method plot.rhohat
displays the estimated function
$\rho$ using plot.fv
, and optionally
adds a rug
plot of the observed values of the covariate.
The method predict.rhohat
computes a pixel image of the
intensity $\rho(Z(u))$ at each spatial location
$u$, where $Z$ is the spatial covariate.
rhohat
X <- rpoispp(function(x,y){exp(3+3*x)})
rho <- rhohat(X, function(x,y){x})
rho
plot(rho)
Y <- predict(rho)
plot(Y)
#
fit <- ppm(X, ~x)
rho <- rhohat(fit, "y")
opa <- par(mfrow=c(1,2))
plot(predict(rho))
plot(predict(rho, relative=TRUE))
par(opa)
Run the code above in your browser using DataLab