meine Variablen:
'data.frame': 395 obs. of 8 variables:
$ Beetle.ID: Factor w/ 123 levels "1_1_10","1_2_8",..: 1 1 2 2 3 3 4 4 5 5 ...
$ Plot.ID : Factor w/ 30 levels "1_1","1_2","1_3",..: 1 1 2 2 3 3 3 3 3 3 ...
$ Treatment: int 1 1 1 1 1 1 1 1 1 1 ...
$ Date : num 1 19 1 24 1 26 1 19 1 29 ...
$ Bodymass : num 0.206 0.232 0.151 0.214 0.136 0.149 0.173 0.207 0.112 0.138 ...
$ Sex : Factor w/ 2 levels "f","m": 1 1 1 1 2 2 1 1 2 2 ...
$ Diversity: Factor w/ 3 levels "C","MC","SC": 3 3 3 3 3 3 3 3 3 3 ...
Date habe ich angepasst, nach dem gecheckt wurde, dass Temperatur keine Signifikanz hat. Mein Grundproblem ist, dass ich die Beetle ID in das Modell bekommen muss, so dass es Sinn ergibt. Ich vergleiche Multicrop Plots mit Singlecrop und Control. Wenn ich über die Zeit die Bodymass messe, dann machts natürlich nur Sinn, wenn die Beetle ID mit berücksichtigt wird. Ich habe das selbstverständlich im Feld gemacht, habe dadurch untersch. und randomierte Messergebnisse und nicht für jedes Individuum gleiche Messtage.
Modell:
lme.fin= lme(Bodymass ~ Date*Diversity-1, data = ds1, random = ~1 | Treatment, method="ML")
summary(lme.fin)
Hab noch subsets für Sex, d.h. dann mit data=ds1.female/male... AIC/BIC deutlich niedriger dann.
Dann partial residuals gebildet für multicrops, singlec, control..
ds1$resid <- resid(lme.fin)
par(mfrow=c(1,3))
ds1.sc <- subset(ds1,Diversity=="SC")
ds1.sc$part.resid <- ds1.sc$resid + summary(lme.fin)$tTable[4] + summary(lme.fin)$tTable[1] * ds1.sc$Date
plot(ds1.sc$Date,ds1$part.resid,
xlab="Date",
ylab="Bodymass"
#,main="Partial residuals"
)
mtext("A", side=3, line=-1.5, adj=0.1)
mtext("Partial residuals", side=3, line=2, adj=2, cex=1.3)
x.sc <- seq(min(ds1.sc$Date),max(ds1.sc$Date),length=100)
y.sc <- summary(lme.fin)$tTable[4] + summary(lme.fin)$tTable[1] * x.sc
lines(x.sc, y.sc, col="white", lwd=5)
lines(x.sc, y.sc)
Macht das überhaupt Sinn? Ich denke nicht... Wie bekomm ich die Beetle ID ins Modell! Sorry, stehe massiv aufm Schlauch und bin auch nicht so der R-Crack!
