Identifying the beginning and ending of series
Posted: Tue Sep 17, 2024 3:18 pm
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
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