Extracting Matrix Statistics

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

oren7171
Posts: 4
Joined: Fri Sep 12, 2014 2:47 am

Extracting Matrix Statistics

Postby oren7171 » Fri Sep 12, 2014 2:54 am

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!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Extracting Matrix Statistics

Postby EViews Gareth » Fri Sep 12, 2014 8:04 am

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)

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

Re: Extracting Matrix Statistics

Postby EViews Glenn » Fri Sep 12, 2014 12:11 pm

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))


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests