normal_envelope: Approximative normal envelope test

Description Usage Arguments Details References Examples

Description

Approximative normal envelope test

Usage

1
normal_envelope(curve_set, alpha = 0.05, n_norm = 2e+05, ...)

Arguments

curve_set

A curve_set (see create_curve_set) or an envelope object. If an envelope object is given, it must contain the summary functions from the simulated patterns which can be achieved by setting savefuns = TRUE when calling envelope().

alpha

The significance level. The 100(1-alpha)% global envelope will be calculated.

n_norm

Number of simulations drawn from the multivariate normal distribution (dimension = number of distances r).

...

Additional parameters passed to estimate_p_value to obtain a point estimate for the p-value. The default point estimate is the mid-rank p-value. The choice should not affect the result, since no ties are expected to occur.

Details

The normal envelope test is a parametric envelope test. If simulation from the null model is extremely tedious, for some test functions T(r) it is possible to use a normal approximation as suggested by Mrkvicka (2009) in a study of random closed sets. The basis of the test is the approximation of the test function T(r), r in I=[r_min, r_max], by a random vector (T(r_1), ...,T(r_m))', where m is the number of distances, that follows multivariate normal distribution with mean mu and variance matrix Sigma which are estimated from T_j(r), j=2, ...,s+1. This test employes T_j(r), j=2, ...,s+1, only for estimating mu and Sigma, and for this s=100 simulations is enough to reach needed accuracy.

This normal envelope test is not a Monte Carlo test. It employes the same envelopes as the studentised envelope test (see st_envelope), i.e. the semiparametric kth lower and upper envelopes

T^u_low(r)= T_0(r) - u sqrt(var_0(T(r))) and T^u_upp(r)= T_0(r) + u sqrt(var_0(T(r))),

but the p-value and the 100(1-alpha) percent global envelope are calculated based on simulations from a multivariate normal distribution.

References

Mrkvička, T. (2009). On testing of general random closed set model hypothesis. Kybernetika 45, 293-308.

Examples

1
2
3
4
5
6
7
require(spatstat)
pp <- spruces
env <- envelope(pp, fun="Lest", nsim=99, savefuns=TRUE,
                correction="translate", r=seq(0,8,length=50))
curve_set <- residual(env, use_theo = TRUE)
system.time( res <- normal_envelope(curve_set, n_norm=200000) )
plot(res)

myllym/spptest documentation built on May 23, 2019, noon