Learn R Programming

dse (version R2000.6-1)

percent.change: Calculate percent change

Description

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

Usage

percent.change(obj, base=NULL, lag=1, cumulate=F, e=F)

Arguments

obj
e
base

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).

Details

If cumulate is T then the data is cumulated first. cumulate can be a logical vector with elements corresponding to columns of m.

See Also

ytoypc

Examples

Run this code
if(is.R()) data("eg1.DSE.data", package="dse1")
z <- percent.change(output.data(eg1.DSE.data))

Run the code above in your browser using DataLab