Learn R Programming

spStack (version 1.1.0)

candidateModels: Create a collection of candidate models for stacking

Description

Creates an object of class 'candidateModels' that contains a list of candidate models for stacking. The function takes a list of candidate values for each model parameter and returns a list of possible combinations of these values based on either simple aggregation or Cartesian product of indivdual candidate values.

Usage

candidateModels(params_list, aggregation = "simple")

Value

an object of class 'candidateModels'

Arguments

params_list

a list of candidate values for each model parameter. See examples for details.

aggregation

a character string specifying the type of aggregation to be used. Options are 'simple' and 'cartesian'. Default is 'simple'.

Author

Soumyakanti Pan span18@ucla.edu,
Sudipto Banerjee sudipto@ucla.edu

See Also

stvcGLMstack()

Examples

Run this code
m1 <- candidateModels(list(phi_s = c(1, 1), phi_t = c(1, 2)), "simple")
m1
m2 <- candidateModels(list(phi_s = c(1, 1), phi_t = c(1, 2)), "cartesian")
m2
m3 <- candidateModels(list(phi_s = list(c(1, 1), c(1, 2)),
                          phi_t = list(c(1, 3), c(2, 3)),
                          boundary = c(0.5, 0.75)),
                      "simple")

Run the code above in your browser using DataLab