I want to figure out if liver values (various biochemical parameters) differ from other organs. I want to include individuals' ID into my approach. I sampled from each individual every time the same set of organs (so these are not independent measurements anymore,...) I have liver, muscles,...etc.
I thought about repeated ONE-WAY ANOVA. I am not so experienced with different kind of ANOVAs... ? So this is a within-subject design, correct me pls if I am wrong.
I have many samples (n = 2130). Normality seems ok from the qqplot.
This is some data:
structure(list(ID = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L), .Label = c("FB4", "FB5", "FB6", "FB7", "FB8", "FB9",
"KBO16", "KBO21", "KBU10", "KBU11", "KBU12", "KBU15", "RB2",
"RB3", "SR1", "SR2", "SR3", "SR5", "SR6", "SR9", "TG1", "TG3",
"TG4", "TG5", "TG6", "YGL23", "YGL30", "YGL31", "YGL34", "YLG16",
"YLG19", "YLG21", "YLG22", "YLK11"), class = "factor"), sub_group.x = structure(c(1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("bullhead", "salmonid"
), class = "factor"), taxa.x = structure(c(1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L), .Label = c("cottus.gobio", "oncorhynchus.mykiss",
"salmo.trutta"), class = "factor"), combi = c("bullhead.brain",
"bullhead.brain", "bullhead.brain", "bullhead.brain", "bullhead.eyes",
"bullhead.eyes", "bullhead.eyes", "bullhead.eyes", "bullhead.liver",
"bullhead.liver"), sub_group.y = c("bullhead", "bullhead", "bullhead",
"bullhead", "bullhead", "bullhead", "bullhead", "bullhead", "bullhead",
"bullhead"), taxa.y = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L), .Label = c("cottus.gobio", "oncorhynchus.mykiss",
"salmo.trutta"), class = "factor"), PUFA = structure(c(1L, 3L,
4L, 2L, 1L, 3L, 4L, 2L, 1L, 3L), .Label = c("ARA.d13C", "DHA.d13C",
"EPA.d13C", "SDA.d13C"), class = "factor"), organ = structure(c(1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("brain", "eyes",
"liver", "muscle"), class = "factor"), isotopic_value = c(-40.0226662,
-43.1508914, -49.2039419, -44.6943377, -40.0226662, -43.1508914,
-49.2039419, -44.6943377, -40.0226662, -43.1508914)), row.names = c(NA,
10L), class = "data.frame")
I programmed a loop - I want to look at each biochemical parameter (variable "PUFA") separately
lapply(levels(leber_new$PUFA)[-4], function(x)
droplevels(na.omit(leber_new[leber_new$PUFA==x,c("ID","PUFA","organ","sub_group.x","isotopic_value")])) %>%
anova_test(dv = isotopic_value, wid = ID,
within = c(organ)))
But it doesn't work:
Error in app$vspace(new_style$`margin-top` %||% 0) :
attempt to apply non-function
Called from: clii__container_start(app, "span", class = funname)
What is it that I am doing wrong?