Group Mean as a Vector/Matrix?

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

caburdick
Posts: 24
Joined: Mon Jun 15, 2009 7:41 am

Group Mean as a Vector/Matrix?

Postby caburdick » Mon Oct 03, 2011 12:28 pm

Is there a way to obtain a vector/matrix with the common sample mean of a group? I'm planning to use Matlab to run some simulations and I need to pass both the mean and covariances for a collction of groups from eviews to matlab. The covariance part is pretty straightforward using group.cov(out=somename) How do I accomplish the same thing for the common sample mean of the series in the group?! It seems like this should be easy but I've spent half a day fighting with it!

startz
Non-normality and collinearity are NOT problems!
Posts: 3796
Joined: Wed Sep 17, 2008 2:25 pm

Re: Group Mean as a Vector/Matrix?

Postby startz » Mon Oct 03, 2011 12:55 pm

maybe @convert to make the group into a matrix and then @cmean to get the means?

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Group Mean as a Vector/Matrix?

Postby EViews Glenn » Mon Oct 03, 2011 2:13 pm

That's how I'd do it...

Code: Select all

stom(groupname, matname) vector cmeans = @cmeans(matname) delete matname
That'll balance the samples for you as well. Use stomna to have the unbalanced samples.


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 2 guests