' Program to analyze Industrial Production: Electric and gas utilites (Fred ID: IPG2211A2N)
' ECON 402
' B.A
wfcreate(wf=ECON 402 - Trend Seasonal) m 1990:1 2017:10
' Create
genr time = @trend(1989:12)
' Create
for !i = 1 to 12
genr month{!i} = @seas(!i)
next
' This is the same as the follow lines
'genr month1
'genr month2
'genr month3
'...
'genr month 12
' Import the dependent
fetch(link, m) IPG2211A2N
' Rename for ease of use
rename ipg2211a2n electricity
' Create
group seasonal month1 month2 month3 month4 month5 month6 month7 month8 month9 month10 month11 month12
'Set the sample
smpl 1990:1 2015:8
' Run Regression
equation equation1.ls electricity c time
' Run regression
equation equation2.ls electricity c time time^2
' Run regression
equation equation3.ls electricity = c(1) * exp(c(2) * (time/100))
' At this point
' We choose
' Add seasonals
equation equation_use.ls electricity time time^2 seasonal
group q1 month1 month2 month3
group q2 month4 month5 month6
group q3 month7 month8 month9
group q4 month10 month11 month12
' Run forecast
smpl 2015:9 2017:8
equation_use.fit(f=nas, e, g) forecast_se
' Plot Forecast
graph figure_forecast.plot forecast-1.96*forecast forecast+1.96*forecast_se electricity
I can't run program from line 1 to 31. Please help. See attachment.
Can't Fetch Fred Data
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
Can't Fetch Fred Data
- Attachments
-
- Screenshot 2022-03-20 142301.png (7.42 KiB) Viewed 9928 times
Who is online
Users browsing this forum: No registered users and 6 guests