compute.var: Computes the variance of a piecewise constant time series...

Description Usage Arguments Value Author(s) Examples

Description

Computes the variance of a piecewise constant time series that may contain jumps by using one-half the variance of the lag-1 differences.

Usage

1

Arguments

y

A matrix of real numbers, each column is a piece-wise constant time series.

use.mean

If TRUE (default) the mean of the lag-1 variances is used, otherwise use the median.

Value

a vector of variances, one for each column.

Author(s)

Nancy R. Zhang

Examples

1
2
3
    a=c(rnorm(100), rnorm(100,1,1), rnorm(100,2,1))
    plot(a)
    compute.var(a)

mpcbs documentation built on May 2, 2019, 4:49 p.m.