I am visualizing average biological parameters (i.e., weights, lengths, age, condition, etc.) over time (specifically across years) using geom_boxplot in ggplot. I have also fit a trend line through each data set using a linear model (specifically using + geom_smooth(method = "lm") and a spline using stat_smooth.An example figure is shown here:
example box plot with trend lines fit
In most cases there appears to be an increasing trend in the mean for each parameter through time. What I would like to do is test this statistically but am not sure how to do this with categorical x variable data (year in this case). Essentially I am looking for options to run a regression type analysis to test if there has been an significant increase through time but I don't have two continuous variables. Any advice would be greatly appreciated.
Thank you.