Page 1 of 1

Extracting Matrix Statistics

Posted: Fri Sep 12, 2014 2:54 am
by oren7171
Hey everyone!

I am currently running a program that estimates many equation (about 400) and I have extracted from each equation the R-squared, AIC and LogL values. I inputted the values into a matrix and I am interested in deleting the equations that are not within the top 10% R-squared values.

For this I can use the mean and standard deviation of the R-squared column of the matrix. The mean is easy to extract ( @cmean(x,1) ) but how do you extract the standard deviation? Or is there an easier way to identify the 90th percentile of the data?

I attempted @stdev(@extractcolumn(x,1)) but it did not work.

Perferably a solution for EViews 7 !
Cheers!

Re: Extracting Matrix Statistics

Posted: Fri Sep 12, 2014 8:04 am
by EViews Gareth
In EViews 7 you'll have to extract each column one at a time into a vector, then find the stdev of it.

Code: Select all

vector temp = @columnextract(x,1) !stdev = @stdev(temp)

Re: Extracting Matrix Statistics

Posted: Fri Sep 12, 2014 12:11 pm
by EViews Glenn
Gareth chose his words carefully, noting that his suggestion is what you'd have to do in EViews 7. For those following along at home, in EViews 8, you could simplify this by using the @col data member of a matrix

Code: Select all

!stdev = @stdev(x.@col(1))