1
$\begingroup$

I have a dataframe that contains the percent of time (percent) animals spent within different temperature bins (bin) during summer and winter (period). The data was generated using satellite transmitters with a temperature sensor and the percentages represent a daily summary statistic, i.e. for each day the summary was created the sum of the percentages across all 12 bins results in 100%. There is no actual temperature data (e.g. degrees Celsius) but just the daily summary of time spent in each bin across one day. Summaries were not created for all days. There are several daily summaries per animal, and there are multiple animals in the dataset.

I want to compare statistically if there is a shift of the percent of time animals spent withing higher/lower temperature bins between the seasons. I don't want to run a statistic that tells me if there is a change in % within the bins between seasons, but be able to make an overall conclusion if there is a shift between seasons. As I visualised my data as a bi-histogram I initially veered towards a chi-square test. However, given the many zeros in my df this seems the wrong way to go.

Here is a snipped of my data to show the datastructure and I am working in R (version: 4.4.1.). Within the original data set there are 9 unique animalnrs and all of those except for one have data during summer and winter.

> df <-dput(test2) structure(list(animalnr = c("183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "183623", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368", "200368"), period = c("winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "summer", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter", "winter" ), bin = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L,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 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L), levels = c("Bin1", "Bin2", "Bin3", "Bin4", "Bin5", "Bin6", "Bin7", "Bin8", "Bin9", "Bin10", "Bin11", "Bin12"), class = "factor"), percent = c(0, 0, 0, 0, 0, 73.3, 26.7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61.2, 38.8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52.1, 47.9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65.1, 34.9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74.3, 25.7, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.1, 95.9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52.4, 47.6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2, 38.6, 61.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23.9, 76.1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.8, 96.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98.5, 1.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99.6, 0.4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99.6, 0.4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99.6, 0.4, 0, 0, 0, 0, 0, 0, 0, 95.5, 1.5, 1.1, 1.5, 0.4, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0)), row.names = c(NA, 876L), class = "data.frame") 
$\endgroup$
4
  • $\begingroup$ This sounds like it might be handled by some type of binomial regression, like logistic regression, with an interaction between bin and season as predictors. That would require knowing more details about how the percentages of time in each temperature bin were determined (e.g., the duration of observations and the precision of the time measurement) and whether these observations are on completely different animals or whether there were multiple observations on the same animals over time. Please edit the question to provide that information; comments are easy to overlook and can be deleted. $\endgroup$ Commented Nov 22, 2024 at 19:53
  • $\begingroup$ Thank you for your input! I edited the question accordingly. $\endgroup$ Commented Nov 22, 2024 at 20:09
  • $\begingroup$ In the data you show there are only two unique values of animalnr, and one of those has no observations for "summer." Are these all the data, or just a snippet to illustrate the nature of the data? If this is just a snippet, how many unique animals are there overall, and are there data on each of them for both "summer" and "winter"? $\endgroup$ Commented Nov 23, 2024 at 18:54
  • $\begingroup$ The data is just a snipped to show the nature of the data. There are 9 unique individual animals in the data and all but one has data for summer and winter. I edited the question to add this information now. $\endgroup$ Commented Nov 25, 2024 at 8:45

1 Answer 1

1
$\begingroup$

I want to ... be able to make an overall conclusion if there is a shift between seasons.

This can be done either by chi-square tests (with hints below about how to avoid problems) or with a simple "mean response model" as described in Section 7.4.5 of Agresti's Categorical Data Analysis.

Chi-square tests

With 9 animals, the most useful display for your audience would be individual histograms by summer and winter for each animal in a 3 by 3 grid. Do the summer/winter statistical comparison for each animal with both summer and winter data, with a correction for the multiple comparisons.

Percentages can be tricky, as the reliability of a percentage outcome depends on the number of observations it was based on. In your case, the percentages by temperature bin for each day come from some digital sampling device, perhaps one temperature sample per minute. Contingency tables are designed to work with counts, so first use the number of samples per day to convert the percentage values to the actual counts within each bin each day for each animal.

If all that you want is a summer/winter comparison, do chi-square tests on two-way contingency tables of bin number versus summer/winter. For each animal, add up the counts for each bin across all days separately for summer versus winter. Omit temperature bins that have zero counts when summed over summer and winter for that animal. For ID 183623 the chi-square test for bin number versus summer/winter was dramatically significant (based on an assumption of 1000 samples per day per animal). I suspect that all 8 animals with both summer and winter data will show similarly large and statistically significant differences. Use a Holm-Bonferroni adjustment for the 8 individual p-values.

Mean response model

That uses an estimated average temperature, for each day in this type of data. Take the midpoint temperature of each bin and calculate the bin-percentage-weighted sum of the midpoint temperatures to estimate the average temperature for each day for each animal. Then you could compare the overall averages between summer and winter days with standard techniques for two-group comparisons, taking into account correlations within animals with a linear mixed model or generalized least squares.

The summer/winter comparison throws away a lot of potentially interesting information. As you presumably have the actual dates for each day's data, a mean response model could readily be adapted for more continuous modeling of changes over time, for example with regression splines.

There are ways to use the temperature order of the bins to get more detailed analyses via ordinal regression, but that seems to be more detail than you want to extract from the data.

$\endgroup$
1
  • $\begingroup$ Thank you for this very detailed response - this is perfect. I followed the described steps and was able to compare the individual histograms for each animal between summer and winter and then applied the holm-bonferroni correction. This worked very smoothly! $\endgroup$ Commented Nov 29, 2024 at 16:01

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.