Hello everyone,
I’m new to EViews programming and I’m struggling to find the answer to this question. We have legacy code where series are hardcoded with dates such as
%end_history = “2024”
%begin_forecast = “2025”
%end_forecast = "2034"
smpl {%begin_forecast } {% end_forecast }
model_mymod.update
model_mymod.solve(s=d)
I come from Stata where you could do something like
. summarize time_var if !missing(my_variable)
local begin_forecast = `r(max)’ + 1
local end_history = `r(max)’
local end_forecast = `r(max)’ + 10
So you can avoid having to hardcode/update the forecast and historical start/end dates.
What would be the analog in this case with Eviews if you had a data set up like this -
FY Some_Series
2021 25
2022 50
2023 75
2024 100
2025
2026
2027
Identifying the beginning and ending of series
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13598
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Identifying the beginning and ending of series
Code: Select all
%end_history = some_series.@last
smpl {%end_history}+1 {%end_history}+10
Re: Identifying the beginning and ending of series
Thank you, Gareth!Code: Select all
%end_history = some_series.@last smpl {%end_history}+1 {%end_history}+10
Who is online
Users browsing this forum: No registered users and 2 guests
