Page 1 of 1

Group Mean as a Vector/Matrix?

Posted: Mon Oct 03, 2011 12:28 pm
by caburdick
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!

Re: Group Mean as a Vector/Matrix?

Posted: Mon Oct 03, 2011 12:55 pm
by startz
maybe @convert to make the group into a matrix and then @cmean to get the means?

Re: Group Mean as a Vector/Matrix?

Posted: Mon Oct 03, 2011 2:13 pm
by EViews Glenn
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.