Hello,
I am having trouble figuring out the correct commands when I try to compare the seasonal naive method with Holt-Winters' additive seasonal exponential smoothing method using time series cross-validation. I have 280 observations of two variables: t = quarterly time (i.e. 2001q1, 2001q2, 2001q3, 2001q4, etc.) and v90 which are random numbers. I'm trying to make one year ahead forecast of v90 and I'm to use all except the last two years of data for my first training set. I'll then use MAE to measure the forecast performance. Lastly, the number of iterations needs to be limited to 15.
Here are the commands I have entered so far, and although they run, it doesn't seem right. (Stata/IC 16.1)
gen f_add = .
gen f_nai = .
forvalues e = 272/276 {
noi di "`e'"
tssmooth shwinters tmp1 = v90 in 1/`e', replace iter(15) forecast(4) add
replace f_add = tmp1 in `=`e'+4'
replace f_nai = l4.v31 in -5/l
}
drop tmp1
gen abserr_fss = abs(v90-f_add)
gen abserr_fsn = abs(v90-f_nai)
noi su abserr*
Any kind of help would be greatly appreciated. Thanks.
Related Posts with Comparing the seasonal naive method with Holt-Winters' additive seasonal exp. smoothing method using ts cross-validation
Standard error of the residuals with vce(robust)Hi All, I am interested in getting the standard error of the residuals after using regress with vce…
Tabulating the number of observations of differences between level of education within couplesHi Statalist. I want to obtain the number of observations for a couple where the level of education…
Testing for strong factoral invariance in longitudinal confirmatory factor analysisI have built a panel dataset out of a yearly government survey that measures the quality of an insti…
Add same extension to existing variable labelsI'm not sure how to phrase this question but I want to use all the existing variable labels but add …
Three-way InteractionsI am working with following panel data linear regression model: y = f(x,y,z) + other control variabl…
Subscribe to:
Post Comments (Atom)
0 Response to Comparing the seasonal naive method with Holt-Winters' additive seasonal exp. smoothing method using ts cross-validation
Post a Comment