Skip to content

question

7 messages · Ebert,Timothy Aaron, Boris Steipe, Carolyn J Miller +1 more

#
Hi Timothy,

Here's some example data that might help to demonstrate how the data currently looks.

AnimalID        Month   Cort
1       12      0.00591
1       3       0.00583
2       3       0.005722
3       3       0.005838
4       3       0.005873
4       12      0.0059
5       3       0.005724
6       12      0.005924
7       12      0.005758
8       12      0.005901
9       12      0.005894
10      3       0.005731
11      3       0.005951

So Animal ID represents individual, 3 or 12 for month represents either a March capture event or a December capture event and then the corresponding cort value (which I used a random number generator to create these values above). Petr, I was afraid of that response, that by using cor() I'm fundamentally just testing the correlation for the 3 individuals that have both March and December samples.

If you guys have other thoughts I'd appreciate any suggestions.

Thanks for your help and clarifying that for me.

Carolyn J. Miller
M.S. Student, Ecology
SUNY-ESF, Environmental Biology
#
As indicated here: https://www.geeksforgeeks.org/compute-the-correlation-coefficient-value-between-two-vectors-in-r-programming-cor-function/
The cor() function needs two vectors. The only way that works is if you are looking at the correlation between "Month" and "Cort."
If you interested in the correlation between  Cort measured in month 3 versus month 12 then you are not getting the right answer.

Animal ID is not relevant in this analysis (as presented).
The animals that have been measured twice would be a repeated measures analysis (by default) unless there is some reason to suspect that the six month lag is too long for an outcome in month 3 to influence the outcome in month 12. The remaining animals are an experimental design for avoiding a repeated measures analysis. This would be something like a t-test to determine if the animals in Month 3 are different than Month 12.

Tim

From: Carolyn J Miller <cjmill04 at syr.edu>
Sent: Tuesday, January 31, 2023 9:30 AM
To: PIKAL Petr <petr.pikal at precheza.cz>; r-help at r-project.org; Ebert,Timothy Aaron <tebert at ufl.edu>
Subject: Re: question

[External Email]
Hi Timothy,

Here's some example data that might help to demonstrate how the data currently looks.

AnimalID
Month
Cort
1
12
0.00591
1
3
0.00583
2
3
0.005722
3
3
0.005838
4
3
0.005873
4
12
0.0059
5
3
0.005724
6
12
0.005924
7
12
0.005758
8
12
0.005901
9
12
0.005894
10
3
0.005731
11
3
0.005951

So Animal ID represents individual, 3 or 12 for month represents either a March capture event or a December capture event and then the corresponding cort value (which I used a random number generator to create these values above). Petr, I was afraid of that response, that by using cor() I'm fundamentally just testing the correlation for the 3 individuals that have both March and December samples.

If you guys have other thoughts I'd appreciate any suggestions.

Thanks for your help and clarifying that for me.

Carolyn J. Miller
M.S. Student, Ecology
SUNY-ESF, Environmental Biology
#
Thank you!

Carolyn J. Miller
M.S. Student, Ecology
SUNY-ESF, Environmental Biology
#
Perhaps, rather than looking to compress your observations into a single number, you could simply visualize what you observed: use a boxplot to show the March and December observations, and overlay the three animals that were recaptured as individual points, connected with a line.

Feel free to ask again if you are not sure how to do that.

Cheers,
Boris


PS. Lets hope that the capture did not stress them to the degree that their cortisol is elevated at recapture :-)
--
Boris Steipe MD, PhD

Professor em.
Department of Biochemistry 
Temerty Faculty of Medicine
University of Toronto
#
Hi Boris,

It's hair cortisol so it shouldn't have an effect. My study species are ungulates, which retain their coat through the winter into the spring shedding out around April/May so in theory these two sampling periods should provide the same results as hair cort provides an average of accumulated cort levels released into the hair over that growth period until they shed out. Of course the individuals that had hair collected in March instead of December have had longer to incorporate more cort levels into the hair collected in comparison to their conspecifics captured in December.

I had a repeated measures approach to this previously but due to missing data from uneven captures the model gets angry since there's only 2 levels of replication and many are not repeated at all. We're considering dividing up the dataset by season to eliminate the need for repeated measures. I've had it suggested that we should use the single measure of cort (which is what most individuals have) in both rows (March and December) based on this logic, and then just run the models as separate seasons.

I ran the t-test between the march and december cort samples and they are not representing the same information.

The joys of data analysis!

Thanks for your feedback,

Carolyn J. Miller
M.S. Student, Ecology
SUNY-ESF, Environmental Biology
#
"The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data."

John Tukey

Cheers,
Bert

On Tue, Jan 31, 2023 at 7:44 AM Carolyn J Miller via R-help <
r-help at r-project.org> wrote:

            

  
  
#
Very true,

Carolyn J. Miller
M.S. Student, Ecology
SUNY-ESF, Environmental Biology