The SSM package provides functions to fit, plot and predict usingsmooth supersaturated models. It defines an S4 class called “SSM”, andmethods for plotting and predicting them. The fitting function is highlycustomizable and provides optional sensitivity analysis and theprovision to estimate metamodel error using a Gaussian process.
The following code will fit a smooth supersaturated model to a 20point design in four factors. Note the design should be held in amatrix, not a data.frame, and all entries must be numeric. The optionsSA,GP andvalidation turn onautomated sensitivity analysis, Gaussian process metamodel errorestimation and Leave-One-Out cross-validation respectively. Theplot method plots the main effects of the model while thepredict method gives the model prediction at a point andalso a 95% credible interval if a metamodel error GP has been fit.
X<-matrix(runif(80,-1,1),ncol =4)Y<-apply(apply(X,1,"^",1:4),2, sum)s<-fit.ssm(X, Y,SA =TRUE,GP =TRUE,validation =TRUE)splot(s,yrange="yrange")predict(s,rep(0.5,4))sensitivity.plot(s)To install the most up-to-date SSM package through GitHub usedevtools::install_github("peterrobertcurtis/SSM").
More details on how to use the SSM can be found in the vignette andhelp pages.