Page 1 of 1

simple question on vectors

Posted: Wed Apr 01, 2009 5:37 am
by henry
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

Re: simple question on vectors

Posted: Wed Apr 01, 2009 5:41 am
by henry
Or do I need to make a 6136 by 34 matrix and input my variables that way?

Re: simple question on vectors

Posted: Wed Apr 01, 2009 8:10 am
by EViews Gareth
Could you explain what you're trying to do?

Re: simple question on vectors

Posted: Wed Apr 01, 2009 8:44 am
by henry
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

Re: simple question on vectors

Posted: Wed Apr 01, 2009 9:05 am
by EViews Gareth
Yes, that is the matrix representation.

But I'm not sure how that relates to EViews per se.

Re: simple question on vectors

Posted: Wed Apr 01, 2009 1:25 pm
by henry
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

Re: simple question on vectors

Posted: Wed Apr 01, 2009 1:39 pm
by EViews Gareth
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....

Re: simple question on vectors

Posted: Wed Apr 01, 2009 3:40 pm
by henry
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

Re: simple question on vectors

Posted: Wed Apr 01, 2009 3:43 pm
by EViews Gareth
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.

Re: simple question on vectors

Posted: Thu Apr 02, 2009 10:51 am
by henry
OK, got it. Thanks for your help.

Henry