Hey there,
I already made some matrices with the coefficients from spearman and parson correlations. Now I wanted to do the same with phi correlation coefficients (as both my variables are binary I cannot use Pearson or Spearman-right?) but it does not work as with the other both commands.
I suspect that the problem is that phi does not store the results in the return list nor in the e-return list but I cannot find anywhere, where they are stored.
This is my code for the matrix:
mat define phi=(3,1)
local line=1
local row=1
foreach var in A B C {
replace `var'=. if `var'>=.
phi `var' D if D<.
mat phi [`line',`row' ]= r(rho)
local line= `line'+1
}
frmttable, stat (phi) sdec (2)[/INDENT]The error I receive is that the matrix contains only missing values.
Does anybody have an idea how to fix that?
Thaank you!
Lisa
I already made some matrices with the coefficients from spearman and parson correlations. Now I wanted to do the same with phi correlation coefficients (as both my variables are binary I cannot use Pearson or Spearman-right?) but it does not work as with the other both commands.
I suspect that the problem is that phi does not store the results in the return list nor in the e-return list but I cannot find anywhere, where they are stored.
This is my code for the matrix:
mat define phi=(3,1)
local line=1
local row=1
foreach var in A B C {
replace `var'=. if `var'>=.
phi `var' D if D<.
mat phi [`line',`row' ]= r(rho)
local line= `line'+1
}
frmttable, stat (phi) sdec (2)[/INDENT]The error I receive is that the matrix contains only missing values.
Does anybody have an idea how to fix that?
Thaank you!
Lisa
Comment