# generate data set.seed(5732) test <- function(x) {(1e6*(x^11*(1-x)^6)+1e4*(x^3*(1-x)^10))+.1} x <- (0:100)/100 lam <- test(x) y <- rpois(x,lam) # fit the model and evaluate pois.fit <- gssanova(y~x,family="poisson") est <- predict(pois.fit,data.frame(x=x),se=TRUE) # plot the fit plot(x,y,ylab=expression(lambda(x))) lines(x,lam,col=6) lines(x,exp(est$fit),col=4) lines(x,exp(est$fit+1.96*est$se),col=5) lines(x,exp(est$fit-1.96*est$se),col=5)