test_model: Performs segmented regression for a given model

Description Usage Arguments Examples

View source: R/modeller.R

Description

This function returns a list which contains stats matrix, parameter matrix and change-point(s).

Usage

1
test_model(model, x, y, cp1 = NA, cp2 = NA)

Arguments

model

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

x

A (column) matrix of outside air temperature, independent variables.

y

A (column) matrix of actual values(usage), dependent variables.

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
3
x = matrix(c(1:10))
y = matrix(c(1,2.5,3,4,5,5.5,7,8.3,9,10))
result = test_model('4P', x, y, 4)

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