Can you make a text object that combines text and the last observation of a series? Eg. the text object created in a program would say, 'the price of oil was" {then the last observation of the oil series] in [then the month of the last observation]
Thanks
Text object question
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Text object question
Code: Select all
wfcreate m 1990 2020
series oil = @nrnd
smpl @last-4 @last
oil = na
smpl @all
text mytxt
%val = @str(@last(oil))
%last = oil.@last
%msg = "The last price of oil was: " + %val + " in " + %last
mytxt.append {%msg}
show mytxt-
helpmecodeplease
- Posts: 7
- Joined: Wed Oct 04, 2023 8:30 am
Re: Text object question
Awesome, thanks Gareth. What if I want it to give me a different observation? Say that observation in the month that a different series had its last observation. So I want to talk about about variable1 which goes to 2025m10 but refer to variable1's observation in the last month of variable2's series?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Text object question
Use the @elem function. https://eviews.com/help/helpintro.html# ... ation.html
Who is online
Users browsing this forum: No registered users and 2 guests
