<font face="trebuchet ms,sans-serif">Será que você não tá fazendo a leitura errada do resultado? Os p-valores (elementos acima da diagonal) são todos positivos, veja<br><br><span style="font-family:courier new,monospace">> # pairwise sample size</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">> # Gabor G - 11/23/2004 R-help List</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">> pn <- function(X){ crossprod(!<a href="http://is.na">is.na</a>(X)) }</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">> cor.prob <- function(X){</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">+ ## Correlations Below Main Diagonal</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">+ ## Significance Tests with Pairwise Deletion</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">+ ## Above Main Diagonal</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">+ ## Believe part of this came from Bill Venables</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">+ pair.SampSize <- pn(X)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">+ above1 <- row(pair.SampSize) < col(pair.SampSize)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">+ pair.df <- pair.SampSize[above1] - 2</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">+ R <- cor(X, use="pair")</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">+ above2 <- row(R) < col(R)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">+ r2 <- R[above2]^2</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">+ Fstat <- (r2*pair.df)/(1-r2)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">+ R[above2] <- 1-pf(Fstat, 1, pair.df)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">+ R</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">+ }</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">> </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">> mydata <- matrix(rnorm(1000), ncol=10)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">> round(cor.prob(mydata),2)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> [1,] 1.00 0.07 0.92 0.71 0.29 0.52 0.05 0.80 0.08 0.77</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> [2,] 0.18 1.00 0.01 0.62 0.45 0.53 0.63 0.05 0.89 0.41</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> [3,] 0.01 -0.25 1.00 0.63 0.36 0.73 0.94 0.09 0.28 0.67</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> [4,] -0.04 0.05 -0.05 1.00 0.11 0.76 0.92 0.26 0.63 0.75</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> [5,] -0.11 -0.08 0.09 0.16 1.00 0.13 0.04 0.20 0.78 0.94</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> [6,] 0.07 0.06 0.04 -0.03 -0.15 1.00 0.53 0.02 0.14 0.85</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> [7,] 0.20 0.05 -0.01 0.01 -0.20 -0.06 1.00 0.92 0.79 0.09</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> [8,] 0.03 0.19 -0.17 0.11 -0.13 -0.23 0.01 1.00 0.29 0.02</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> [9,] 0.17 -0.01 -0.11 0.05 0.03 0.15 0.03 -0.11 1.00 0.12</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">[10,] 0.03 0.08 0.04 -0.03 0.01 -0.02 0.17 -0.24 0.16 1.00</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">> </span><br style="font-family:courier new,monospace">
<br>As correlações estão abaixo da diagonal.<br><br>À disposição.<br>Walmes.<br><br clear="all"></font><span style="font-family:trebuchet ms,sans-serif">==========================================================================</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">Walmes Marques Zeviani</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">Departamento de Estatística - Universidade Federal do Paraná</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">fone: (+55) 41 3361 3573</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">VoIP: (3361 3600) 1053 1173</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">e-mail: <a href="mailto:walmes@ufpr.br" target="_blank">walmes@ufpr.br</a></span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">twitter: @walmeszeviani</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">homepage: <a href="http://www.leg.ufpr.br/%7Ewalmes" target="_blank">http://www.leg.ufpr.br/~walmes</a></span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">linux user number: 531218</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">==========================================================================</span><br>