Home   >   User Resources   >   Online Help   >   apaData.Proxy.CategoryAverage
 

 

Function index Version 3.0.0

apaData.Proxy.CategoryAverage(DataMatrix, CategoryLabels, ProxyIndicators, DoUseExistingDataForCategoryAvg, DoReplaceAll, MinGapSize, MaxGapSize)

Excel=apaData.Proxy.CategoryAverage(DataMatrix, CategoryLabels, ProxyIndicators, DoUseExistingDataForCategoryAvg, DoReplaceAll, MinGapSize, MaxGapSize)

Result

Proxies series with category average values.

Syntax

DataMatrix: a jagged time series data matrix, each column containing a time series

CategoryLabels: 1 x n vector with category labels

ProxyIndicators: 1 x n vector of 0s and 1s; a value of 1 means that the series is proxied by the category average. Other values return an error.

DoUseExistingDataForCategoryAvg: TRUE if existing data of the proxied series is included in the category average, FALSE if only the values of the other series in the same category are used

DoReplaceAll: TRUE if existing values are overridden by the category average, FALSE if existing values are kept

MinGapSize: minimum gap size to fill in; must not be negative

MaxGapSize: maximum gap size to fill in; must not be smaller than MinGapSize

Remarks

For each row, the category average is the mean of the numeric values of the series in the same category; proxied series are included only if DoUseExistingDataForCategoryAvg is TRUE. A missing element of a proxied series is replaced if the run of consecutive non-numeric cells containing it is between MinGapSize and MaxGapSize long; runs at the start or end of a series count as gaps as well. If the category has no numeric values in that row, #N/A is returned. CategoryLabels and ProxyIndicators may be row or column vectors with one entry per column of DataMatrix. Blank cells that are not filled are shown as #N/A.