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
gmatch and psmatch2I am trying to conduct a logistic regression after propensity score matching. I tried both gmatch ps…
xtivreg2 instrumental variables with endogenous variable involves in interaction termsHi all, I'm conducting analysis in the form below: Code: y = x1 + x2 + x3 + x1*x2 In which x1 is …
esttabWhy is it when I enter the following command: "forvalues i = 1/5 { regress edge percentFRL ipr_se_v…
Add Optional t-test to Stata ProgramI have a stata program that displays a twoway bar graph and I want to add a t-test to the program, b…
reshape data long to wide with several IDsI could not reshape my data from my previous posting. Please help me solve this problem. This is a …
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