iode.Variables.trend_correction
- Variables.trend_correction(input_file: str, lambda_: float, series: str | List[str] = None, log: bool = False)[source]
Implementation of the Hodrick-Prescott method for trend series (= variables) construction. The principle is the same as for deseasonalization: series read from a file are imported and transformed simultaneously.
If the log flag is set, the series are log-transformed before calculation and exp-transformed after calculation. The series values must therefore be strictly positive.
- Parameters:
- input_file: str
filepath to the input file.
- lambda_: float
Lambda parameter of the Hodrick-Prescott method.
- series: str or list(str), optional
list of series on which to apply the trend correction. Defaults to None (all variables).
- log: bool, optional
Whether or not the series are log-transformed before calculation and exp-transformed after calculation. The series values must therefore be strictly positive. Defaults to False.
See also