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.
test.model.MSAR(data,simu,lag=NULL,id=1,u=NULL)observed (or reference) time series, array of dimension T*N.samples*d
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)
maximum lag for auto-correlation functions.
considered component. It is usefull when data is multivariate.
considered levels for up crossings
Returns a list including
statistics of marginal distributions, based on Smirnov like statistics
test statistic
quantiles .05 and .95 of the distribution of the test statistic under the null hypothesis
p value
statistics of correlation functions
test statistic
quantiles .05 and .95 of the distribution of the test statistic under the null hypothesis
p value
statistics of intensity of up crossings
test statistic
quantiles .05 and .95 of the distribution of the test statistic under the null hypothesis
p value
statistics of marginal distributions, based on Anderson Darling statistics
test statistic
quantiles .05 and .95 of the distribution of the test statistic under the null hypothesis
p value
%% ~Describe the value returned %% If it is a LIST, use %% \item{comp1 }{Description of 'comp1'} %% \item{comp2 }{Description of 'comp2'} %% ...
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$$
valid_all, test.model.MSAR