Extracting values from the vector

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

vytama
Posts: 58
Joined: Wed Dec 19, 2012 11:05 am

Extracting values from the vector

Postby vytama » Thu Nov 17, 2016 8:53 am

Hello,

I have a rowvector(50) with correlation values. I would like to take the values of specified columns from this rowvector and place in a new vector. For instance, I would like to take values from columns 5,7,10,25 and 50. What is the best way to achieve that? Thank you.

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

Re: Extracting values from the vector

Postby EViews Gareth » Thu Nov 17, 2016 4:18 pm

Code: Select all

newvector(1) = oldvector(5)
Follow us on Twitter @IHSEViews

vytama
Posts: 58
Joined: Wed Dec 19, 2012 11:05 am

Re: Extracting values from the vector

Postby vytama » Fri Nov 18, 2016 6:30 am

Thank you Gareth, but how to make newvector(5) filled with values from five columns of oldvector(50)? Let's say column 5 has a value of 0.5, column 7 has a value of 0.3 and etc. I would like my newvector(5) to have values 0.5,0.3, ....). Thank you

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

Re: Extracting values from the vector

Postby EViews Gareth » Fri Nov 18, 2016 6:49 am

Fill them in one at a time.
Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: Google [Bot] and 65 guests