Learn R Programming

NHMSAR (version 1.4)

test.model.MSAR:

Description

Performs bootstrap statistical tests to validate MSAR models. Marginal distribution, auto correlation function and up-crossings are considered. For each of them the tests statistic computed from observations is compared to the distribution of the satistics corresponding to the MSAR model.

Usage

test.model.MSAR(data,simu,lag=NULL,id=1,u=NULL)

Arguments

data
observed (or reference) time series, array of dimension T*N.samples*d
simu
simulated time series, array of dimension T*N.sim*d. N.sim have to be K*N.samples with K large enough (for instance, K=100)
lag
maximum lag for auto-correlation functions.
id
considered component. It is usefull when data is multivariate.
u
considered levels for up crossings

Value

Returns a list including
StaDist
statistics of marginal distributions, based on Smirnov like statistics
..$dd
test statistic
..$q.dd
quantiles .05 and .95 of the distribution of the test statistic under the null hypothesis
..$p.value
p value
Cor
statistics of correlation functions
..$dd
test statistic
..$q.dd
quantiles .05 and .95 of the distribution of the test statistic under the null hypothesis
..$p.value
p value
ENu
statistics of intensity of up crossings
..$dd
test statistic
..$q.dd
quantiles .05 and .95 of the distribution of the test statistic under the null hypothesis
..$p.value
p value
AD
statistics of marginal distributions, based on Anderson Darling statistics
..$dd
test statistic
..$q.dd
quantiles .05 and .95 of the distribution of the test statistic under the null hypothesis
..$p.value
p value

Details

Test statistics Marginal distribution: $$ S = \int_{-\infty}^{\infty} \left| F_n(x)-F(x) \right| dx$$

Marginal distribution, based on Anderson Darling statistic: $$ S = \int_{-\infty}^{\infty} \left| \frac{F_n(x)-F(x)}{F(x)(1-F(x))} \right| dx$$

Correlation function: $$ S = \int_0^L\left|C_n(l)-C(l)\right|dl$$

Number of up crossings: $$ S = \int_{-\infty}^{\infty}\left|E_n(N_u)-E(N_u)\right|du$$

See Also

valid_all, test.model.MSAR