bw.relriskHeatppp | R Documentation |
Performs data-based bandwidth selection for
the diffusion estimate of relative risk relriskHeat.ppp
using either likelihood cross-validation or least squares
bw.relriskHeatppp(X, ..., method = c("likelihood", "leastsquares"),
weights = NULL, srange = NULL, ns = 16, sigma = NULL,
leaveoneout = TRUE, verbose = TRUE)
X |
A multitype point pattern (object of class |
... |
Arguments passed to |
method |
Character string specifying the cross-validation method.
Partially matched to |
weights |
Optional numeric vector of weights associated with each point of |
srange |
Numeric vector of length 2 specifying a range of bandwidths to be considered. |
ns |
Integer. Number of candidate bandwidths to be considered. |
sigma |
Maximum smoothing bandwidth.
A numeric value, or a pixel image, or a |
leaveoneout |
Logical value specifying whether intensity values at data points should be estimated using the leave-one-out rule. |
verbose |
Logical value specifying whether to print progress reports. |
This algorithm selects the optimal global bandwidth for
kernel estimation of relative risk for the dataset X
using diffusion smoothing relriskHeat
.
If sigma
is a numeric value, the algorithm finds the
optimal bandwidth tau <= sigma
.
If sigma
is a pixel image or function, the algorithm
finds the optimal fraction 0 < f <= 1
such that
smoothing with f * sigma
would be optimal.
A numerical value giving the selected bandwidth
(if sigma
was a numeric value)
or the selected fraction of the maximum bandwidth
(if sigma
was a pixel image or function).
The result also belongs to the class "bw.optim"
which can be
plotted.
, \tilman and Suman Rakshit.
relriskHeat.ppp
## bovine tuberculosis data
X <- subset(btb, select=spoligotype)
if(interactive()) {
smax <- 40
ns <- 16
dimyx <- NULL
} else {
## reduce data and resolution to speed up
X <- X[c(TRUE, rep(FALSE, 7))]
smax <- 9
ns <- 8
dimyx <- 32
}
b <- bw.relriskHeatppp(X, sigma=smax, ns=ns, dimyx=dimyx)
b
plot(b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.