Entering edit mode
4.6 years ago
selplat21
▴
20
Hello,
I am looking at continuous data for body length over the course of 200 years (date) and am trying to plot a boxplot for the distribution of body length in each of k predefined bins over time.
For example, how would I bin these data in 20 year chunks and plot a histogram in each for body length.
Can an ANOVA be run on these distributions?
Thank you!
Do you have one measurement for each timepoint or multiple individuals? Why are you so eager to run ANOVA?
There are multiple individuals at every time point (independent sampling). I want to run the ANOVA because I have a couple alternate hypotheses that in one of these time bins, there body length might be expected to change, so I wanted to run ANOVA and then a post hoc test to determine whether pre- and post- this time bin, there are differences.
Please use
ADD COMMENT/ADD REPLY
when responding to existing posts to keep threads logically organized.SUBMIT ANSWER
is for new answers to original question.Will do! My apologies.
Sounds like a t-test for me. Two groups, lots of measures in each one. As for representing it, you can bin several time points together but I don't really see the benefit here, you can draw boxplots for each time point
I've done t-tests, which have been useful here as you suggested, but I wanted to look at boxplots in each bin as there are alternative bins of time that could be causal. The changes we see fit more of an additive model than a linear one.
It seems like I can scrap the ANOVA, but for visual purposes I would like to look at data each bin.
What seems to be working for me is binning dates through the mutate function and then running something like this in ggplot2
ggplot( aes(x=bin, y=length) ) + geom_boxplot() + theme_ipsum() + xlab("Time")
Thanks all!
Just make sure that you understand what the ANOVA test measures. As its name applies is tests the variation of different bins, not necessarily the values. Also be careful with covariates.
ANOVA (one-way) is the test for the equality of means in 3 or more groups. While the test is derived from between- and within-group variation, it's not a test of variance.
To answer the boxplot question, the following is an illustration of what I think you want. Some fake data first:
Yes, you're right. but it assumes that the variance is equal between populations and if this assumption is not met then it might not test for the difference of means.