Hi group,
I am trying, as an Aster newbie, to understand what the mean value parameters depict, as they do not seem to always reflect the measured variable.
Our data is basically very typical experiment where plants have been grown for some years in different sites and their survival and flower production has been recorded. Year and survival in each year, with survival in the previous year being the parent node for survival in each consecutive year. How should we interpret the estimate of the model?
We get estimates ranging from 0.8 to 5.7. Are these some kind of cumulative mean flowering abundance estimates given survival and flowering or more like a combined fitness value with no definite meaning? Also, when estimating for the first parental nodes (in our case survival over three years; 0-1 for each individual for each year) the analysis yields estimates higher than 1. How should we interpret this?”
The script is very much the same that can be found in the Aster package tutorial. Please, help!
######
#predictions for survival
renewdata <- reshape(newdata, varying = list(vars),
direction = "long", timevar = "varb", times = as.factor(vars),
v.names = "resp")
# linear function matrix
nind <- nrow(newdata)
nnode <- length(vars)
amat <- array(0, c(nind, nnode, nind))
for (i in 1:nind)
amat[i , grep("A1", vars), i] <- 1 #here I chose the variables begining with "A1"
# prediction of mean value parameter
foo <- predict(aout1, varvar = varb, idvar = id, root = root,
newdata = renewdata, se.fit = TRUE, amat=amat)
bar <- cbind(foo$fit, foo$se.fit)
dimnames(bar) <- list(as.character(newdata$Site), c("Estimate", "Std. Error"))
print(bar)
#simple prediction data that can easily be plotted
MyData<- expand.grid(Site = levels(P$Site),
Var= levels(P$Var))
MyData$Pred=foo$fit
MyData$CiUp= foo$fit + crit * foo$se.fit
MyData$CiLo= foo$fit - crit * foo$se.fit
#order Sites
MyData$Site=factor(MyData$Site, levels=c("A", "B", "C", "D", "E"))
#plot
ggplot(data = MyData, aes(x = Site, y = Pred, ymin = CiLo, ymax = CiUp, colour = Var))+
geom_point(position=position_dodge(width=0.6), size=5) +
geom_errorbar(width = 0.3, position=position_dodge(width=0.6), lwd=1) +
stat_summary(data = MyData, aes(group=Var), fun.y = "mean", geom="point", lwd=2, position=position_dodge(width=0.6)) +
scale_colour_manual(values = c("blue","red")) +
theme_bw() +
labs(title= "Aster model response", colour="Variety")+
ylab(label = "Response") +
xlab(label="Site")