splitter: Splits and restructures a matrix

Description Usage Arguments Examples

Description

This function produces a matrix based on different change-points inside an interval and models. For example, if the model is '3PC', then any points in xmat less than the change-point, cp1, will be set to be zero and cp1 will be substracted from the rest of the points.

Usage

1
splitter(model, xmat, cp1 = NA, cp2 = NA)

Arguments

model

A character string. Model such as '2P', '3PH', '3PC', '4P' or '5P'.

xmat

Independent Column matrix (dimesion, n by 1).

cp1

A numeric value. The first change-point. Defaults to NA.

cp2

A numeric value. The second change-point. Defaults to NA.

Examples

1
2
x = matrix(c(1,2.3,2.78, 3.4,5.5, 6.1, 7 ,8.4, 9,10))
x_split = splitter('4P', x, 3)

tinnaing347/bRema documentation built on Aug. 23, 2019, 9:15 p.m.