Learn R Programming

gets (version 0.22)

paths: Extraction functions for 'arx', 'gets' and 'isat' objects

Description

Extraction functions for objects of class 'arx', 'gets' and 'isat'

Usage

paths(object, ...)
terminals(object, ...)
rsquared(object, adjusted=FALSE, ...)

Arguments

object

an object of class 'arx', 'gets' or 'isat'

adjusted

logical. If TRUE the adjusted R-squared is returned

additional arguments

Value

paths:

a list with the paths searched (each number refers to a regressor in the GUM)

terminals:

a list with the terminal models (each number refers to a regressor in the GUM)

rsquared:

a numeric, the R-squared of the regression, or adjusted R-squared if adjusted is set to TRUE

Details

paths and terminals can only be applied on objects of class 'gets' and 'isat'

See Also

getsm, getsm, getsv, isat

Examples

Run this code
# NOT RUN {
##Simulate from an AR(1):
set.seed(123)
y <- arima.sim(list(ar=0.4), 50)

##Simulate four independent Gaussian regressors:
xregs <- matrix(rnorm(4*50), 50, 4)

##estimate an AR(2) with intercept and four conditioning
##regressors in the mean:
mymod <- arx(y, mc=TRUE, ar=1:2, mxreg=xregs)
rsquared(mymod)
rsquared(mymod, adjusted=TRUE)

##General-to-Specific (GETS) modelling of the mean:
meanmod <- getsm(mymod)
rsquared(meanmod)
rsquared(meanmod, adjusted=TRUE)

##extract the paths searched:
paths(meanmod)

##extract the terminal models:
terminals(meanmod)
# }

Run the code above in your browser using DataLab