| homtestmap | R Documentation |
Compute the test statistic for the test of homogeneity of a locally-fitted Poisson or Gibbs point process model.
homteststat(object, ..., verbose = FALSE)
homtestmap(object, ...,
what=c("components", "statistic", "pvalue"),
test = c("score", "taylor", "likelihood"),
ladjust=c("none", "moment", "PSS"),
calibrate=c("chisq", "Satterthwaite", "firstmoment"),
simple = !is.null(theta0),
theta0 = NULL,
poolmoments=NULL,
sigma = NULL,
saveall = FALSE,
use.fft = TRUE,
verbose = TRUE)
## S3 method for class 'homtestmap'
update(object, ...,
what=NULL, test=NULL, ladjust=NULL,
calibrate=NULL, saveall=FALSE, poolmoments=NULL)
object |
Locally-fitted point process (object of class |
... |
For |
what |
Character string (partially matched)
indicating whether to return the vector components
of the local test statistic, or the value of the local test statistic, or
the local |
test |
Character string (partially matched)
indicating whether to perform
the local score test ( |
ladjust |
Character string (partially matched) specifying an adjustment to the composite likelihood ratio test statistic. |
calibrate |
Character string (partially matched)
specifying how to calculate |
simple |
Logical value indicating whether to treat the fitted model
as a simple null hypothesis ( |
theta0 |
Coefficient vector specifying a simple null hypothesis. |
poolmoments |
Logical value indicating how to calculate the reference distribution
for the likelihood ratio test statistic (and thus how to
calculate |
sigma |
Smoothing bandwidth. |
saveall |
Logical value indicating whether to compute a complete set of sufficient statistics and save them as an attribute of the result. See Details. |
use.fft |
For software testing purposes only. Logical value indicating whether to use data computed by the Fast Fourier Transform. |
verbose |
Logical value indicating whether to print progress reports. |
These functions are used by homtest to
perform a Monte Carlo test of the null hypothesis of
homogeneity (i.e.\ constant parameter values) for the locally-fitted
Poisson point process or Gibbs point process object.
The function homtestmap computes
either the local likelihood ratio test statistic
or the local score test statistic.
If what="statistic", then the result is a scalar-valued
function giving the local values of the test statistic.
If what="pvalue", the result is a scalar-valued function p(v)
giving the local p-value at each location v.
If what="components", the result is a vector-valued
function T(v) containing the components of the quadratic form;
the squared norm of T(v) is
equal to the desired test statistic at each location v.
If saveall=TRUE, then a complete set of sufficient statistics is
calculated and stored as an attribute of the result. This makes it
possible to compute all of the statistics and p values
described above.
The function update.homtestmap, a method for the
generic function update, converts
an object of class "homtestmap" from one of these formats to
another, where possible. Except in trivial cases, this requires that
the "homtestmap" object was computed with saveall=TRUE.
The function homteststat computes the mean of
the local test statistic or the mean
of the local p-values over the
observation window.
To compute the p-values when test="likelihood"
or test="taylor", the values of the local likelihood ratio
test statistic are referred to a gamma distribution whose first two
moments are estimated from the data. If poolmoments=FALSE,
the local estimates of the moments are used; if
poolmoments=TRUE, the spatial average of these estimates
is used. The default is to use pooling whenever it is
theoretically justified, namely when the template
model is a stationary point process.
Finer control over the computation is possible
using the arguments ... passed to locppm.
For homteststat, a numeric value giving the test statistic.
For homtestmap and update.homtestmap,
a spatially-sampled function object (class "ssf"; see
ssf).
This object also belongs to the special class
"homtestmap" which has a print method.
.
homtest
example(locppm)
plot(H <- homtestmap(fit))
H
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.