Learn R Programming

gets (version 0.1)

glog.ep: Adjust for zero values and compute log(abs(e)^p)

Description

Adjusts a series called e - typically a series of residuals or financial returns - for zero values, so that the logarithm can be applied on the absolute pth. exponentiated values. Next, log(abs(e)^p) is computed

Usage

glog.ep(e, zero.adj = 0.1, p = 2, na.replace = NA)

Arguments

e
numeric vector, time series or zoo object
zero.adj
numeric value between 0 and 1 (the quantile adjustment for zero values). The default 0.1 means zeros are replaced by the 10 percent quantile of abs(e) before taking the logarithm
p
numeric value greater than zero. The power of the log-volatility specification
na.replace
the value to replace NA values with. Default: na.replace=NA

Value

  • log(abs(e)^p), a numeric, where the zeros in e have been adjusted