Learn R Programming

greybox (version 0.6.4)

is.greybox: Greybox classes checkers

Description

Functions to check if an object is of the specified class

Usage

is.greybox(x)

is.alm(x)

is.occurrence(x)

is.greyboxC(x)

is.greyboxD(x)

is.rollingOrigin(x)

is.rmc(x)

Arguments

x

The object to check.

Value

TRUE if this is the specified class and FALSE otherwise.

Details

The list of functions includes:

  • is.greybox() tests if the object was produced by a greybox function (e.g. alm / stepwise / lmCombine / lmDynamic);

  • is.alm() tests if the object was produced by alm() function;

  • is.occurrence() tests if an occurrence part of the model was produced;

  • is.greyboxC() tests if the object was produced by lmCombine() function;

  • is.greyboxD() tests if the object was produced by lmDynamic() function;

  • is.rmc() tests if the object was produced by rmc() function;

  • is.rollingOrigin() tests if the object was produced by ro() function.

Examples

Run this code
# NOT RUN {
xreg <- cbind(rlaplace(100,10,3),rnorm(100,50,5))
xreg <- cbind(100+0.5*xreg[,1]-0.75*xreg[,2]+rlaplace(100,0,3),xreg,rnorm(100,300,10))
colnames(xreg) <- c("y","x1","x2","Noise")

ourModel <- alm(y~x1+x2, xreg, distribution="dnorm")

is.alm(ourModel)
is.greybox(ourModel)
is.greyboxC(ourModel)
is.greyboxD(ourModel)

# }

Run the code above in your browser using DataLab