Package 'disagg2'

Title: Support Functions for Time Series Analysis Book
Description: Contains the support functions for the Time Series Analysis book. We present a function to calculate MSE and MAE for inputs of actual and forecast values. We also have the code for disaggregation as found in Wei and Stram (1990, <doi:10.1111/j.2517-6161.1990.tb01799.x>), and Hodgess and Wei (1996, "Temporal Disaggregation of Time Series").
Authors: Erin Hodgess [aut, cre]
Maintainer: Erin Hodgess <[email protected]>
License: GPL-2 | GPL-3
Version: 0.1.0
Built: 2025-02-25 06:15:29 UTC
Source: https://github.com/cran/disagg2

Help Index


Create a disaggregated time series

Description

Input an annual, quarterly series. Create a quarterly or monthly series via ARIMA

Usage

disag1(x, m)

Arguments

x

Input ts, must have frequency of 1 or 4

m

Order of disaggregation, must be 12, 4, or 3

Details

Uses ARIMA model on the aggregate series to create a disaggregate series

Value

y_s

Disag. series to be summed

y_m

Disag. series mean

disphi

Disagg phi value

distheta

Disagg theta value

dissig2

Disagg sigma2

References

William W.S. Wei and Daniel Stram, 1990, Disaggregation of Time Series Models, Journal of the Royal Statistics Society, B, Vol 52, Number 3, pp. 453-467. Erin M. Hodgess and William W.S. Wei, 1996, Temporal Disaggregation of Time Series, Applied Statistical Science I, pp. 33-43, Nova Science Publishers, Commack, NY


Calculate MSE and MAE for actual and forecast values

Description

The inputs are the actual and the forecast values. We calculate the Mean Square Error (MSE) and Mean Absolute Error (MAE)

Usage

foremeas1(actx, forex)

Arguments

actx

actual values

forex

forecast values

Details

MSE = mean((act-fore)^2), MAE = mean(abs(act-fore))

Value

MSE

Mean square error

MAE

Mean absolute error

Author(s)

c( person( "Erin", "Hodgess", email = "[email protected]", role = c("aut", "cre") ) )


Create an nxn symmetric matrix from an n length vector

Description

Create an nxn symmetric matrix from an n length vector

Usage

mySym(x)

Arguments

x

input length n vector

Details

create an nxn symmetric matrix

Value

y

symmetric matrix

Author(s)

c( person( "Erin", "Hodgess", email = "[email protected]", role = c("aut", "cre") ) )

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or standard data sets, see data().
mySym(1:6)