pet
is a categorical variable with two categories (fish or cat). Therefore, we need to look at this relationship using a point-biserial correlation. I also asked for 95% confidence intervals (given the small sample, we might have been better off with bootstrap confidence intervals, but I want to mix things up). The figure below shows that there was a significant relationship between type of pet and life satisfaction because the oberved p-value is less than the criterion of 0.05 and the confidence intervals do not cross zero, 𝑟pb= 0.63, BCa CI [0.25, 0.83], p = 0.003. Looking at how the groups were coded, fish had a code of 1 and cat had a code of 2, therefore this result reflects the fact that as the type of pet changes (from fish to cat) life satisfaction goes up. Put another way, as having a cat as a pet was associated with greater life satisfaction.
Variable | pet | life_satisfaction | |||||
---|---|---|---|---|---|---|---|
1. pet | Pearson's r | — | |||||
p-value | — | ||||||
Lower 95% CI | — | ||||||
Upper 95% CI | — | ||||||
2. life_satisfaction | Pearson's r | 0.630 | — | ||||
p-value | 0.003 | — | |||||
Lower 95% CI | 0.261 | — | |||||
Upper 95% CI | 0.839 | — | |||||
We can conduct a partial correlation between life satisfaction and the pet the person has while ‘adjusting’ for the effect of liking animals. The output below for the partial correlation is a matrix of correlations for the variables pet
and life_satisfaction
but adjusting for the love of animals. First, notice that the partial correlation between pet
and life_satisfaction
is 0.701, which is greater than the correlation when the effect of animal liking is not adjusted for (r = 0.630). The correlation has become more statistically significant (its p-value has decreased from 0.003 to < 0.001) and the confidence interval [0.453, 0.876] still doesn’t contain zero. Running this analysis has shown us that the relationship between the type of pet and life satisfaction is not due to how much the owners love animals.
Variable | pet | life_satisfaction | |||||
---|---|---|---|---|---|---|---|
1. pet | Pearson's r | — | |||||
p-value | — | ||||||
Lower 95% CI | — | ||||||
Upper 95% CI | — | ||||||
2. life_satisfaction | Pearson's r | 0.701 | — | ||||
p-value | < .001 | — | |||||
Lower 95% CI | 0.453 | — | |||||
Upper 95% CI | 0.876 | — | |||||
Note. Conditioned on variables: animal. | |||||||
Note. Confidence intervals based on 1000 bootstrap replicates. |