Earlybird
Earlybird

Reputation: 31

Extract r value from pearson correlation data

I am using pingouin stat package to find the correlation between two sets of data, and I then want to check if this correlation is strong. However, I get 5-6 output values, of which only one is r. How do I obtain the r out of the output data?

Code:

b = pg.corr(x=df['Bitcoin Start Value'], y=df['Gold Start Value'])

Output:

          n      r         CI95%     r2  adj_r2     p-val    BF10  power
pearson  35  0.558  [0.28, 0.75]  0.311   0.268  0.000501  70.273   0.95

Upvotes: 0

Views: 334

Answers (1)

Cristian Ispan
Cristian Ispan

Reputation: 764

Writing b['r'][0] will give you the r number. The same with the other output variables.

Upvotes: 0

Related Questions