vetools (version 1.3-28)

disaggregate.ts: Desagregates a time-series

Description

This function disaggregates pilled-up data. Agregation points are denoted by the scalar following one or more asterisks. The job of this function is to distribute the mass accumulated in the first non asterisk measurment between the previous points marked with asterisks.

Usage

disaggregate.ts(x, ...)

Arguments

x
An aggregated ts object.
...
defaults to asterisk = -9999 and fun = median. Where asterisk is a scalar that denotes values to complete, defaults to -9999, and fun is the name of the function to use to build the sampled distributions. Defaults to median.

Value

Returns a disaggregated ts object.

Details

Say a time-series is of weekly frequency and is
Week   Mon  Tue  Wen  Thu  Fri  Sat  Sun
...
k     14.5 19.0 25.5 25.2 19.8 12.3 13.7
k+1   NA   18.7    *    *    * 83.2 14.2
...
The task is to distribute 83.2 between Wen and Sat of week k+1 using the sampled distribution of Wen, Thu, Fri and Sat of all available weeks. Sometime this is not possible and in this case all days get the equal mass distribution.

See Also

disaggregate.MARN