Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

percentChange.TSdata

Calculate percent change


Description

Calculate the percent change relative to the data lag periods prior.

Usage

## S3 method for class 'TSdata'
percentChange(obj, base=NULL, lag=1, cumulate=FALSE, e=FALSE, ...)
    ## S3 method for class 'TSestModel'
percentChange(obj, base=NULL, lag=1, cumulate=FALSE, e=FALSE, ...)

Arguments

obj

An object of class TSdata or TSestModel

e

see the default method.

base

see the default method.

lag

see the default method.

cumulate

see the default method.

...

arguments passed to other methods.

Details

Value

For an object of class TSdata the percent change calculation is done with the output data and the result is an object of class TSdata (or a list of objects of class TSdata). For an object of class TSestModel the percent change calculation is done with estimates$pred and the result is an object of class TSdata (or a list of objects of class TSdata).

See Also

Examples

data("eg1.DSE.data", package="dse")
z <- percentChange(outputData(eg1.DSE.data))

dse

Dynamic Systems Estimation (Time Series Package)

v2020.2-1
GPL-2
Authors
Paul Gilbert <pgilbert.ttv9z@ncf.ca>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.