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
simple question on vectors
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
Re: simple question on vectors
Or do I need to make a 6136 by 34 matrix and input my variables that way?
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13317
- Joined: Tue Sep 16, 2008 5:38 pm
Re: simple question on vectors
Could you explain what you're trying to do?
Follow us on Twitter @IHSEViews
Re: simple question on vectors
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
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
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13317
- Joined: Tue Sep 16, 2008 5:38 pm
Re: simple question on vectors
Yes, that is the matrix representation.
But I'm not sure how that relates to EViews per se.
But I'm not sure how that relates to EViews per se.
Follow us on Twitter @IHSEViews
Re: simple question on vectors
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
Henry
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13317
- Joined: Tue Sep 16, 2008 5:38 pm
Re: simple question on vectors
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....
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
Re: simple question on vectors
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
Henry
- Attachments
-
- gradient_ihs.pdf
- (15.92 KiB) Downloaded 295 times
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13317
- Joined: Tue Sep 16, 2008 5:38 pm
Re: simple question on vectors
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.
You'll have to write out the sums manually.
Follow us on Twitter @IHSEViews
Re: simple question on vectors
OK, got it. Thanks for your help.
Henry
Henry
Who is online
Users browsing this forum: No registered users and 25 guests