AndrewLJackson / SIBER

ellipse and convex hull fitting package for stable isotope data
36 stars 14 forks source link

Correlation and linear modeling to test relationship of N between different samples? #91

Closed naalipalo closed 1 year ago

naalipalo commented 2 years ago

I have sampled from the same individual in 3 locations and I wanted to determine how distinct the samples are from each other. So I ran a lm in R and I feel like there is something there that is interesting, but I don't know if I am interpreting this incorrectly or if the entire exercise is a no-no.

My equations: test<-lm(claw1~fur, data = animal) The result is a slope of 0.93. Which in regular lm world, would mean for every 1 increase in N of fur, the N in claw1 would increase by 0.93. The correlation between these two tissues is 0.73.
test<-lm(claw1~claw2, data = animal) The result is a slope of 0.64. which though is still significant has a lower correlation of 0.67. And I would read this as, for every 1 increase in N of claw2, claw1 increases by 0.64.

That there is still a positive relationship between claw1 and claw2, they are not reading as identical, there is a difference. Whereas, claw1 is nearly identical to fur. Because these tissues were sampled from different parts of an animal, the growth rates will be different. I was proposing that claw1 and fur would be similar and was wanting it to be different from claw2. When using SIBER, the ellipse tests show similar type patterns where the amount of overlap is greater between claw1 and fur, but claw2 overlaps similarly with fur.

I have run this on yet another set of samples and claw1 and claw2 are the same. The ellipse analysis shows a an even stronger distinction between claw1 and claw2 with very little overlap compared to the first dataset, but when I run the lm, the correlation strong (0.64) and the slope is 0.77.

Basically, the first set of samples in SIBER show a bit of a muddled overlap, yes there is some distinction between the 3, but its vague and not definitive. Yet, the linear modeling of Nitrogen signatures within the same individual show a distinct correlation between fur and claw1 and a low correlation between claw 1 and claw2. Whereas the second set of samples, if I just look at the claw samples, the distinction shows up more in the SIBER ellipse and not as much in the linear modeling where they have a higher slope.

I don't know if this is all confusing, or if what I am doing is the very reason to use Bayesian algorithms....I saw some similar analysis done in Bearhop, S., R. W. Furness, G. M. Hilton, S. C. Votier, and S. Waldron. 2003. A forensic approach to understanding diet and habitat use from stable isotope analysis of (avian) claw material. Functional Ecology 17:270-275.

AndrewLJackson commented 1 year ago

I don't really follow this question and I think it is outside the scope of this statistical package so I will close this issue. It reads to me more like an interpretation question which is related more specially to the particular system under study.