Description Usage Arguments Details Value Author(s) Examples

Functions used internally.

1 |

`x` |
A vector of observations, possibly with missing values. |

`type` |
Character, type of index to calculate. |

`ts_index`

calculates positional indices of elements of a vector
that fulfill the following conditions when `type = "density"`

:
(1) if there is only one observation present before the first `NA`

,
it is not selected, else, all the observations preceding to the
first `NA`

are selected;
(2) if there is only one observation present after the last `NA`

,
it is not selected, else, all the observations following the
last `NA`

are selected;
(3) if there is only one observation present between two
consecutive `NA`

s, it is not selected, else, all the
observations falling between two consecutive `NA`

s are selected.
`ts_index`

calculates positional indices of elements of a vector
that immediately follow a missing (`NA`

) value if
`type = "expectation"`

. The reason for this
is that these elements depend on missing data given a first order
Markov process. As a result, these need different treatment in
calculating log densities for model selection.

`ts_index`

returns an integer vector.

Peter Solymos and Khurram Nadeem

1 2 3 4 5 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.