Description Usage Arguments Details References Examples
Approximative normal envelope test
1 | normal_envelope(curve_set, alpha = 0.05, n_norm = 2e+05, ...)
|
curve_set |
A curve_set (see |
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 |
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.
Mrkvička, T. (2009). On testing of general random closed set model hypothesis. Kybernetika 45, 293-308.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.