Fill in a vector with a large number of scalars

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

RDS
Posts: 86
Joined: Thu Feb 17, 2011 9:50 am

Fill in a vector with a large number of scalars

Postby RDS » Wed Jan 30, 2019 3:20 pm

I would like to save and store one coefficient of the equation below in a vector(200) in order to generate a graph.
I generate n numbers of scalars, which I then try to put together in a vector. However, the last part of the code is not working properly. It gives me a constant, namely the last estimated value in the routine.



!n = 200
for !i =0 to !n
smpl 1995:01+!i 2018;12-!n+!i
equation fg!i.ls(n) d(EURIBOR3M) c d(GDP)
scalar coef_gdp!i = fg!i.@coefs(2)
next

vector(!n) coefgdp

for !i =0 to !n
coefgdp = coef_gdp!i
next

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: Fill in a vector with a large number of scalars

Postby EViews Gareth » Wed Jan 30, 2019 3:24 pm

Code: Select all

coefgdp(!i) = coef_gdp!i
Follow us on Twitter @IHSEViews


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 11 guests