copula_params: For discrete series, Probability Integral Transform sampling...

Description Usage Arguments Value

View source: R/utils.R

Description

For discrete series, Probability Integral Transform sampling maps observations onto a Uniform distribution that is then mapped onto a Gaussian distribution for modelling. This is essentially a copula method where we assume the 'marginal' is a discrete distribution. This function determines whether a Poisson or Negative Binomial is more appropriate for the series and then generates the approximately Gaussian PIT-transformed values of the series.

Usage

1
copula_params(y, non_neg = TRUE, censor = 1, k = 1)

Arguments

y

ts object containing the discrete time series. NAs are allowed and will be interpolated using a combination of rollmean and na.interp

non_neg

logical indicating whether the series is restricted to be non-negative. Default is TRUE

censor

numeric value ranging 0 - 1 indicating the upper quantile of values to truncate high outliers to prior to estimating discrete distribution parameters. Useful when large outliers an lead to inflated estimates of the distribution mean. Default is 0.99

k

integer indicating the width of the rolling window to use for smoothly interpolating missing values. See more in rollmean

Value

A list containing the original series with missing values interpolated, the approximately Gaussian transformed series and the estimated discrete distribution parameter(s)


nicholasjclark/mvforecast documentation built on Dec. 22, 2021, 2:11 a.m.