Returns an array of cells of a time series after substituting all missing values with the mean/median.
Syntax
SUBNA(X, Order, Method, Value, H)
- X
- is the input data sample (one- or two-dimensional array of cells).
- Order
- is the time order in the data series (i.e. the first data point's corresponding date (earliest date = 1 (default), latest date = 0)).
Order Description 1 Ascending (the first data point corresponds to the earliest date) (default) 0 Descending (the first data point corresponds to the latest date) - Method
- is an identifier for the method used to generate values for any missing data (1 = mean (default), 2 = median, and others). For the full list of methods, visit the NumXL help file.
Value Method 1 Mean (default) 2 Median 3 Constant 4 Forward Flat 5 Backward Flat 6 Linear 7 Cubic Spline 8 Weighted Moving Average 9 Exponential Smoothing 10 Brownian Bridge - Value
- is the data argument related to the selected treatment method (if applicable). For instance, if the method is constant, then the value would be the actual value.
- H
- is the smoothing parameter (aka. bandwidth). If missing or omitted, a default value of one (1) is used.
Remarks
- The time series in the data set are homogeneous or equally spaced.
- Each column in the input data set corresponds to a separate time series variable.
- Each row in the input data set corresponds to an observation.
- The function operates only on intermediate missing values. Missing values on both sides are left unchanged.
- The function maintains the original time order of the data set.
- The function returns an array equal to the size of the input data. To view the whole output, select an appropriate space in the worksheet and press Ctrl+Shift+Enter.
Files Examples
Related Links
- What to do About Missing Values in Time Series Cross-Section Data , James Honaker and Gary King, American Journal of Political Science
References
- Paul D. Allison; Missing Data; SAGE Publications, Inc; 1st Edition(Aug 13, 2001), ISBN: 0761916725
- Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0-691-04289-6
- Tsay, Ruey S.; Analysis of Financial Time Series John Wiley & SONS. (2005), ISBN 0-471-690740
Comments
Article is closed for comments.