simple question on vectors

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

henry
Posts: 13
Joined: Sun Mar 29, 2009 9:38 am

simple question on vectors

Postby henry » Wed Apr 01, 2009 5:37 am

Hi all,

I would like to know how to make a rowvector out of my 34 variables. I have the series already (let's call them a1,a2,a3,...,a34. 6136 obs in each). I know I can make the rowvector by typing rowvector(34), but how do I input my series into this? I already have my beta column vector.

Help would be greatly appreciated.

Best,
Henry

henry
Posts: 13
Joined: Sun Mar 29, 2009 9:38 am

Re: simple question on vectors

Postby henry » Wed Apr 01, 2009 5:41 am

Or do I need to make a 6136 by 34 matrix and input my variables that way?

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

Re: simple question on vectors

Postby EViews Gareth » Wed Apr 01, 2009 8:10 am

Could you explain what you're trying to do?
Follow us on Twitter @IHSEViews

henry
Posts: 13
Joined: Sun Mar 29, 2009 9:38 am

Re: simple question on vectors

Postby henry » Wed Apr 01, 2009 8:44 am

Sure, I will rephrase my question:

Let's say I want to run the regression x = b1.a1 + b2.a2 + b3.a3 + ... + b34.a34

where the b's are the betas and a's are my variables.

is this the same thing as x = (34 by 1 column vector of betas) * (6136 by 34 matrix of variables) ?

(6136 because I have 6136 observations)

Henry

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

Re: simple question on vectors

Postby EViews Gareth » Wed Apr 01, 2009 9:05 am

Yes, that is the matrix representation.

But I'm not sure how that relates to EViews per se.
Follow us on Twitter @IHSEViews

henry
Posts: 13
Joined: Sun Mar 29, 2009 9:38 am

Re: simple question on vectors

Postby henry » Wed Apr 01, 2009 1:25 pm

OK thanks. So can I not use this notation on eviews? Say I want @cnorm(b1.a1+b2.a2+...+b34), can I use @cnorm(34 by 1 beta vector * 6136 by 34 matrix)? Or do I have to type it all out?

Henry

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

Re: simple question on vectors

Postby EViews Gareth » Wed Apr 01, 2009 1:39 pm

You could, if you wanted, convert the X data into a matrix, then multiply it by the coefficient vector from your equation.


However it seems to me that all you want to do is get the fitted values of Y. You can use the fit command to do this much more easily.

Unless I'm still not understand what it is you are trying to do....
Follow us on Twitter @IHSEViews

henry
Posts: 13
Joined: Sun Mar 29, 2009 9:38 am

Re: simple question on vectors

Postby henry » Wed Apr 01, 2009 3:40 pm

I'm trying to create the values on the first page of the attached file so I can then create the log likelihood function. I want to know whether I can use matrix notation.

Henry
Attachments
gradient_ihs.pdf
(15.92 KiB) Downloaded 295 times

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

Re: simple question on vectors

Postby EViews Gareth » Wed Apr 01, 2009 3:43 pm

If you are trying to use the LogL object to perform likelihood estimation, then you must steer clear of matrices - you cannot use matrix objects inside a LogL object.

You'll have to write out the sums manually.
Follow us on Twitter @IHSEViews

henry
Posts: 13
Joined: Sun Mar 29, 2009 9:38 am

Re: simple question on vectors

Postby henry » Thu Apr 02, 2009 10:51 am

OK, got it. Thanks for your help.

Henry


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 25 guests