D_eta: Create a design matrix D for a model eta

Description Usage Arguments Value

Description

Create a design matrix D for a model eta

Usage

1
D_eta(x, eta, scale_trend_design)

Arguments

x

The time series data, a numeric vector of length n.

eta

A multiple changepoint configuration, i.e., model. It is a 0/1 indicator vector of length n, with the first p elemenets always being 0.

scale_trend_design

The factor multiplied to the design matrix of trend. Default is 1/50.

Value

D

A n by (2*m-1) matrix. The first m columns are for regime means; they are 0/1 indicators for regimes from 2 to m. The next (m+1) columns are for trends.

seg_lengths

A vector of length m, regime lengths, including the first regime.


yingboli/BayesMDL documentation built on May 29, 2019, 12:18 p.m.