Function cscale()
will do the scaling based on the selected method, while
the function cdescale()
will transform the variable to get to the
original units.
cscale(y, scaling = c("normalisation", "standardisation", "max"))cdescale(yScaled, y, scaling = c("normalisation", "standardisation", "max"))
A vector of the same size as y
, containing scaled complex variable.
vector of a complex variable in the original scale.
scaling method to use. "normalisation" implies scaling
to make sure that y
lie in [0, 1] (subtract the minimum value and divide by
the range). "standardisation" standardises the variable (i.e. subtract the mean
then divide by standard deviation). "max" just divides the variable by the
maximum value.
vector of the already scaled complex variable.
Ivan Svetunkov, ivan@svetunkov.ru
Svetunkov, S. & Svetunkov I. (2022) Complex Autoregressions. In Press.
# Generate random complex variables
y <- complex(real=rnorm(100,10,10), imaginary=rnorm(100,10,10))
yScaled <- cscale(y)
cdescale(yScaled, y)
Run the code above in your browser using DataLab