# IARPermutation: Test for the significance of the autocorrelation estimated by... In iAR: Irregularly Observed Autoregressive Models

 IARPermutation R Documentation

## Test for the significance of the autocorrelation estimated by the iAR package models

### Description

This function perform a test for the significance of the autocorrelation estimated by the iAR package models. This test is based in to take N disordered samples of the original data.

### Usage

```IARPermutation(
y,
st,
merr = 0,
iter = 100,
phi,
model = "iAR",
plot = TRUE,
xlim = c(-1, 0),
nu = 3
)
```

### Arguments

 `y` Array with the time series observations. `st` Array with the irregular observational times. `merr` Array with the variance of the measurement errors. `iter` Number of disordered samples of the original data (N). `phi` autocorrelation estimated by one of the iAR package models. `model` model used to estimate the autocorrelation parameter ("iAR", "iAR-Gamma", "iAR-T", "CiAR" or "BiAR"). `plot` logical; if true, the function return a density plot of the distribution of the bad fitted examples; if false, this function does not return a plot. `xlim` The x-axis limits (x1, x2) of the plot. Only works if plot='TRUE'. See `plot.default` for more details. `nu` degrees of freedom parameter of the iAR-T model.

### Details

The null hypothesis of the test is: The autocorrelation coefficient estimated for the time series belongs to the distribution of the coefficients estimated on the disordered data, which are assumed to be uncorrelated. Therefore, if the hypothesis is accepted, it can be concluded that the observations of the time series are uncorrelated.The statistic of the test is log(phi) which was contrasted with a normal distribution with parameters corresponding to the log of the mean and the variance of the phi computed for the N samples of the disordered data. This test differs for `IARTest` in that to perform this test it is not necessary to know the period of the time series.

### Value

A list with the following components:

• phi MLE of the autocorrelation parameter of the model.

• bad MLEs of the autocorrelation parameters of the models that has been fitted to the disordered samples.

• norm Mean and variance of the normal distribution of the disordered data.

• z0 Statistic of the test (log(abs(phi))).

• pvalue P-value computed for the test.

### References

\insertRef

Eyheramendy_2018iAR

`Planets`,`IARloglik`, `IARTest`, `CIARkalman`

### Examples

```data(Planets)
t<-Planets[,1]
res<-Planets[,2]
y=res/sqrt(var(res))
res3=IARloglik(y,t,standardized=TRUE)[1]
res3\$phi
set.seed(6713)
require(ggplot2)
test<-IARPermutation(y=y,st=t,phi=res3\$phi,model="iAR",plot=TRUE,xlim=c(-9.6,-9.45))
```

iAR documentation built on Nov. 25, 2022, 1:06 a.m.