# NOT RUN {
n<-50
x<-(1:n)^{1/3}
z<-as.factor(rbinom(n, 1, 0.6))
y<-x+7*as.numeric(z)+rnorm(n,sd=2)
bcgam.fit <- bcgam(y~sm.incr(x)+z, nloop=100)
predict(bcgam.fit, newdata=data.frame(x=0.5, z="1"), parameter="mu", interval="prediction")
# }
Run the code above in your browser using DataLab