Hi,
1)How can I get the probability of the correlation coefficient significantly different from 0? I know, this is possible via the command: matrix_name.cor(prob), but how can I get it via a command with 2 series i.e. scalar cor_pvalue =@cor({%Y},{%X})?
2)In a vector V1 (extracted from correlation matrix) containing 5 correlation coefficient from variables (X1,to X5), I would like to identify the variable with a highest correlation coefficient.
How can I get the name of the variable? %selected_variable = @cimax(V1)?
Thanks
correlation pvalue and index
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: correlation pvalue and index
1) Put the series into a group then use group.cor(prob)
2) Hard to say without seeing the rest of your code. But assuming you have (or can put) the names in a string somewhere:
2) Hard to say without seeing the rest of your code. But assuming you have (or can put) the names in a string somewhere:
Code: Select all
%names = "x1 x2 x3 x4 x5"
!imax = @cimax(v1)
%selected_variable = @word(%name, !imax)
Re: correlation pvalue and index
!kmax = @cimax(Vcor) leads to "Error assigend to scalar", Why?
I think perhaps better to sort the vector by descending order and to select the second line V1(2).
By the way how can I constraint te command "@cimax" e.g. !kmax = @cimax(Vcor) <>1, i.e.select max from the vector different to "1"?
I think perhaps better to sort the vector by descending order and to select the second line V1(2).
By the way how can I constraint te command "@cimax" e.g. !kmax = @cimax(Vcor) <>1, i.e.select max from the vector different to "1"?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
correlation pvalue and index
You cannot.
Who is online
Users browsing this forum: No registered users and 2 guests
