I have a dataset with measurements of a animal color pattern from a body part, measured under multiple conditions.In brief, each animal was treated from one side of the body, but not from the other, so here I assume that I have paired treatment and control data. Animals were reared at either high or low temperatures, the pattern values were measured from both sides, the body part values were also measured from both sides as a covariant. I'm interested to see the impact of temperature, treatment, and their interactions, on pattern values.
Here's a example of the structure of my dataset.
pattern body treatment temperature ID
54.19922 785456 Y low L1
142.38281 754103 Y low L2
465.91797 810738 N low L1
531.25000 754103 N low L2
2217.67578 624083 Y high H1
481.83594 396332 Y high H2
3883.10547 636011 N high H1
777.73438 377092 N high H2
Each ID indicates one unique animal, so each ID has both paired treated and untreated measurements.
This is my model using the anova_test function from the rstatix package.
res=anova_test(data=df,dv=pattern,wid=ID,between=c(temperature,treatment),covariate = body,type = 3)
However, I got a warning message:
Warning: The 'wid' column contains duplicate ids across between-subjects variables. Automatic unique id will be created
I wonder if there is any problem with the IDs assigned to the samples?Is it ok to proceed? Also, I wonder if this model is equivalent to the model below?
aov(pattern~body+temperature*treatment+Error(ID/(treatment)),df)
anova_test()function is part of the basic R distribution that people reading this question might be familiar with. Please edit the question to indicate the package from which it was obtained so that others can evaluate what's going on. On this site, please provide additional information like that by editing the question itself; comments are easy to overlook and can even be deleted. – EdM Jul 02 '23 at 19:45