Page 1 of 1

Create a vector from 3 vectors of different size

Posted: Tue Jul 29, 2014 8:58 am
by DBel2012
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

Re: Create a vector from 3 vectors of different size

Posted: Tue Jul 29, 2014 9:04 am
by EViews Gareth
A matrix is a rectangle. Conceptually, how do you envisage making one from 3 different sized vectors?

Re: Create a vector from 3 vectors of different size

Posted: Tue Jul 29, 2014 9:13 am
by DBel2012
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!

Re: Create a vector from 3 vectors of different size

Posted: Tue Jul 29, 2014 9:40 am
by EViews Gareth
There's a @vcat function to perform vertical concatenation

Re: Create a vector from 3 vectors of different size

Posted: Tue Jul 29, 2014 10:09 am
by DBel2012
Gareth,

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

Thanks anyway!

Re: Create a vector from 3 vectors of different size

Posted: Tue Jul 29, 2014 10:56 am
by EViews Gareth
Ah, true.

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

Re: Create a vector from 3 vectors of different size

Posted: Tue Jul 29, 2014 11:10 am
by DBel2012
Great!

It works perfectly!

Thanks a lot!