Create a vector from 3 vectors of different size

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

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

DBel2012
Posts: 69
Joined: Sun Sep 30, 2012 5:37 am

Create a vector from 3 vectors of different size

Postby DBel2012 » Tue Jul 29, 2014 8:58 am

Hello,

I'm using EViews 7.

I need to create a vector from 3 vectors of different size.

How can I do that?

Thanks!

Danny

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

Re: Create a vector from 3 vectors of different size

Postby EViews Gareth » Tue Jul 29, 2014 9:04 am

A matrix is a rectangle. Conceptually, how do you envisage making one from 3 different sized vectors?

DBel2012
Posts: 69
Joined: Sun Sep 30, 2012 5:37 am

Re: Create a vector from 3 vectors of different size

Postby DBel2012 » Tue Jul 29, 2014 9:13 am

Gareth,

vec1 is 1x20, vec2 is 1x32 and vec3 is 1x 40

I want to stack vec1, vec2 and vec3 one over another in order to have one big vector.

Can I do that?

Thanks!

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

Re: Create a vector from 3 vectors of different size

Postby EViews Gareth » Tue Jul 29, 2014 9:40 am

There's a @vcat function to perform vertical concatenation

DBel2012
Posts: 69
Joined: Sun Sep 30, 2012 5:37 am

Re: Create a vector from 3 vectors of different size

Postby DBel2012 » Tue Jul 29, 2014 10:09 am

Gareth,

This a function seems to be available only on EViews 8.

Thanks anyway!

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

Re: Create a vector from 3 vectors of different size

Postby EViews Gareth » Tue Jul 29, 2014 10:56 am

Ah, true.

Create a vector of the correct size, then use the matplace function to insert your smaller vectors.

DBel2012
Posts: 69
Joined: Sun Sep 30, 2012 5:37 am

Re: Create a vector from 3 vectors of different size

Postby DBel2012 » Tue Jul 29, 2014 11:10 am

Great!

It works perfectly!

Thanks a lot!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests