# 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 mu <- test(x) y <- rgamma(x,shape=4,scale=mu/4) # fit the model and evaluate gamma.fit <- gssanova(y~x,family="Gamma") est <- predict(gamma.fit,data.frame(x=x),se=TRUE) # plot the fit plot(x,y,ylab=expression(mu(x))) lines(x,mu,lty=2,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)