# generate data and fit the model set.seed(5732) x <- (0:100)/100 y <- 1 + 3 * sin(2*pi*x) + 2 * (x>.7) + rnorm(x) part.fit <- ssanova(y~x,partial=as.numeric(x>.7),ext=0) # evaluate the fit and plot new <- data.frame(x=x,partial=as.numeric(x>.7)) est <- predict(part.fit,new,se=TRUE) plot(x,y) lines(x,1+3*sin(2*pi*x)+2*(x>.7),col=6) lines(x,est$fit,col=4) lines(x,est$fit+1.96*est$se,col=5) lines(x,est$fit-1.96*est$se,col=5)