aq.trans$survived <- aq.trans$fate!="dead"
a <- subset(aq.trans, leaf<50 & stage!="recruit", c(leaf,survived))
logi.hist.plot(a$leaf, a$survived,
type="hist", boxp=FALSE, counts=TRUE, int=10,
ylabel="Survival probability", ylabel2="Number of plants",
xlab="Number of leaves")
b <- glm(survived ~ leaf, binomial, data=a)
summary(b)
Run the code above in your browser using DataLab