model_test: Tests if a model passes tTest, population test, and shape...

Description Usage Arguments Examples

View source: R/modeller.R

Description

This function determines if a given model passes tTest, population test, and shape test. The output is a nested list. If the model passes all three tests, 'Pass' is returned as main_test result; otherwise, as 'Fail'.

Usage

1
model_test(x, y, bestvalue, model, n = 4)

Arguments

x

A vector. Independent variables.

y

A vector. Dependent variables.

bestvalue

A list containing information about parameters such as slopes, change-points, and stats such as RMSE.

model

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

n

A numeric value that determines threshold for population test: thereshold = number_of_independent_variables/n. Defaults to 4. See pop_test.

Examples

1
2
3
4
5
util = subset(unretrofit_utility, unretrofit_utility$bdbid == 'f3acce86'
			& unretrofit_utility$energy_type == 'Elec')
temp = sort_matrix(util$OAT,util$usage)
bestvalue = create_model(temp$x, temp$y, '5P')
test_result = model_test(temp$x, temp$y, bestvalue, '5P')

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