vetools (version 1.3-28)

disaggregate.MARN: Disaggregates a time-series using a reference (surrogate) serie

Description

For a brief introduction on disaggregation see disaggregate.ts. In order to disaggregate, a distribution of the asterisks is required. In this implementation, the distribution is estimated using a surrogate serie. In general terms the surrogate serie is very carefully drafted.

Usage

disaggregate.MARN(stream = NULL, reference = NULL, na.action = "error", asterisk = -9999, date.eps = 0.004, float.eps = 1e-04, return.incomplete = TRUE)

Arguments

stream
An aggregated ts object.
reference
A reference or surrogate ts object.
na.action
Action to take if the sample distribution has NAs present. Can be "mean" ("average", "warning", "continue") or "error". In the first case the sampled distribution is the average. On the second, the process is stoped, if return.incomplete is true then the progress of disaggregation is returned.
asterisk
Scalar denoting values to complete.
date.eps
Tolerance in date/time matching.
float.eps
Smallest mass to distribute along the aggregated elements.
return.incomplete
Boolean value to interrupt the process and return the incompletely disaggregated series. See details.

Value

Returns a disaggregated series. If the switch return.incomplete is true, then it returns a series that was disaggregated until NAs where found on the sample distribution.

Details

The parametre return.incomplete is very usefull to build surrogate series, as follows. Say there is a list of 15 aggregated series, then in order to build a reference series for all of them, the following hueristic can help. Suppose these series are ordered by least NAs and asterisks present.
reference <- pr[[1]]
k = 1
restart:
for ( station in 1:k ) {
        reference <- desagregate.MARN(pr[[k]], 
        reference, return.incomplete=TRUE)
}
if ( reference is not yet fully desagregated ) { k <- k + 1 }
goto restart
The main feature of this procedure is that it always tries to use the best serie first then the second best, etc. It may not complete the task if the sample distribution contains NAs for all 15 stations. Under this precarious condition, artificial or external information can be used.

See Also

disaggregate.ts