Source: Hesterberg et al
might be better than a histogram:
There are two ways (at least):
bootstrap
package.Recall the soap data:
Pearson's product-moment correlation
data: speed and scrap
t = 15.829, df = 10, p-value = 2.083e-08
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.9302445 0.9947166
sample estimates:
cor
0.9806224
speed
and scrap
:1000 times:
bcanon
, write a function that takes a vector of row numbers and returns the correlation between speed
and scrap
for those rows:[1] 0.9928971
bcanon
are now:
line_b
)cor.test
uses the Fisher \(z\) transformation which “spreads out” correlations close to 1).
Comments