addMethod: Add a method to a "term" object

View source: R/rterm.R

addMethodR Documentation

Add a method to a "term" object

Description

Adds an evaluation method to a "term" object. Current options are for a change point model, Variable Base Degree Day (VBDD or PRISM) model, or a Bayesian change point model. Note that you can add multiple methods to the same "term" with repeated calls of this function.

Usage

addMethod(term, method, name = NULL, ...)

Arguments

term

the term object to add the method.

method

the method name "changepoint", "degreeday", or "web"

name

an optional name for this method

...

optional extra parameters for the specific methodology.

Details

For the bayesian "web" method, you can modify the prior through "Mean" and "Sd" suffixes to the parameter names. For example, for the "baseLoad" parameter you can specify a "baseLoadMean" and "baseLoadSd" for prior mean and standard deviation of the base load.

For the frequentist "changepoint" and "degreeday" methods, you can specify whether to generate bootstrap standard errors with se = TRUE/FALSE & the number of bootstrap replicates with "nreps". In addition you can tweak the L1 penalty strength by specifying "lambda"

Value

the term object w/ the method added

See Also

newTerm addData addMethod

Examples

stationSearch("Seattle, WA")
mod <- addMethod(mod, "changepoint")
mod <- addMethod(mod, "degreeday")
mod <- addMethod(mod, "web", name = "normal")
mod <- addMethod(mod, "web", baseLoadMean = 100, name = "higher base")
mod <- addMethod(mod, "cp", se = FALSE, lambda = 20)

EcotopeResearch/rterm documentation built on Oct. 17, 2022, 4:02 p.m.