I try to do some tests to find a relationship between fertility and stringency indexes. When I use the fertility rate correlation between them will be positive but when I use logarithm of fertility the correlation will be negative. I do not think it makes sense. I search a lot but unfortunately, I could not reach a specific reason.
Code:
Variables | (1) | (2) | (3) | (4) |
(1) lnfer_change | 1.000 | |||
(2) GDP_growth2 | 0.333 | 1.000 | ||
(3) stringencyinde~s | -0.238 | -0.186 | 1.000 | |
(4) GDP_growth | 0.250 | 0.863 | -0.197 | 1.000 |
Code:
Variables | (1) | (2) | (3) | (4) |
(1) fer_change | 1.000 | |||
(2) GDP_growth2 | -0.074 | 1.000 | ||
(3) stringencyinde~s | 0.346 | -0.186 | 1.000 | |
(4) GDP_growth | -0.077 | 0.863 | -0.197 | 1.000 |
0 Response to Why generating the variable in logarithm form change the sign of correlation and scatterplot?
Post a Comment