What is the best model code for RStudio longitudinal model: 19 time points with 6 groups (1 factor with 2 levels, 1 factor with 3 levels), one response continuous, one response percentage?

Data from a longitudinal biology study. Is there a difference between groups over time? 3 independant factorial fixed effects (solution type with 2 levels, temperature with 3 levels, time with 19 levels) = 6 groups. There are 2 response variables (continuous variable: weight(mg)) and (percentage: (above last weight)).
There will be a correlation between time readings as the same groups are measured over 19 time points.

This perhaps wants two models, one for the continuous response, one for percent.

Plot, model, assumptions, re-plot. Thank you!

head(ab)
  temp  type  ID    dry_weight_mg time  weight.mg pc.dryweight
  <fct> <fct> <fct>         <dbl> <fct>     <dbl>        <dbl>
1 25    DS    DS25           1820 0m         1820         0   
2 25    DS    DS25           1820 5m         1921         5.55
3 25    DS    DS25           1820 20m        1998         9.78
4 25    DS    DS25           1820 30m        1999         9.84
5 25    DS    DS25           1820 12.5h      2169        19.2 
6 25    DS    DS25           1820 24h        2241        23.1 

plotted with

ggplot(ab, aes(x = time, y = response, colour = type, group = type)) +
  geom_point() +
  geom_line() +
  facet_wrap(ab$temp) +
  scale_colour_manual(values = c(DS = "blue", MT = "green"), labels = c("Control", "Treatment")) +
  labs(colour='type') +
  xlab("") +
  ylab("") +
  scale_y_continuous(limits = c(0, 50)) +
  labs(title = "") +
  theme_bw() +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

Best code for the model & assumptions?
Cheers in advance

So, going over this data with someone else, it looks like the issue with trying to fit a linear model to this is that there is nowhere for the anova to get it's 'within' error for each group from; because in effect there is only one observation per group (ID). While within each group is n=25, they are recorded as one unit to minimise measurement error. I will leave this question up incase anyone else has an inaugaral longitudinal design. GLIMMPSE was used for a priori power and sample size estimates (n=18). The sample sizes were bundled and measured as one group, which halted the ability to run stats from the design. One applied way to do it is to replicate each combination of treatments (each of the 6 groups) a minimum 18 times.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.