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
Replacing values when duplicatesDear all, I struggled to find a proper title for the following issue. I have the following panel da…
DID with multiple periods and treatmentsDear all, I am analysing the impacts of dung beetles (treatment) on livestock productivity (outcome…
Bivariate analysis in Stata 13Suppose I have 10 variables and I want to make a table like the picture below: Array How can I get…
Help on understanding Cross-sectional dependenceHello together, I need some help in understanding cross-sectional dependence regarding the use of D…
Graphical legendDear All, I have this graph: Array obtained by (Thanks to Nick Cox), Code: set scheme s1color bys…
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