# NOT RUN {
x1<-c(0,.02,.075,.08,.14,.15,.155,.156,.18,.22,.29,.32,.36,
.37,.42,.5,.57,.63,.72,.785,.8,.84,.925,1)
x2<-c(.29,.02,.12,.58,.38,.87,.01,.12,.22,.08,.34,.185,.64,
.02,.93,.15,.42,.71,1,0,.21,.5,.785,.21)
X<-cbind(x1,x2)
yobs<-sin(1/((x1*0.7+0.3)*(x2*0.7+0.3)))
# }
# NOT RUN {
#Fit the CGP model
#Increase the lower bound for nugget to 0.01 (Optional)
mod<-CGP(X,yobs,nugget_l=0.01)
summary(mod)
mod$objval
#-27.4537
mod$lambda
#0.6210284
mod$theta
#6.065497 8.093402
mod$alpha
#143.1770 145.2049
mod$bandwidth
#1
mod$rmscv
#0.5714969
# }
Run the code above in your browser using DataLab