Learn R Programming

The SSM package provides functions to fit, plot and predict using smooth supersaturated models. It defines an S4 class called "SSM", and methods for plotting and predicting them. The fitting function is highly customizable and provides optional sensitivity analysis and the provision to estimate metamodel error using a Gaussian process.


The following code will fit a smooth supersaturated model to a 20 point design in four factors. Note the design should be held in a matrix, not a data.frame, and all entries must be numeric. The options SA, GP and validation turn on automated sensitivity analysis, Gaussian process metamodel error estimation and Leave-One-Out cross-validation respectively. The plot method plots the main effects of the model while the predict method gives the model prediction at a point and also 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)
s
plot(s, yrange="yrange")
predict(s, rep(0.5, 4))
sensitivity.plot(s)

To install the most up-to-date SSM package through GitHub use devtools::install_github("peterrobertcurtis/SSM").


More details on how to use the SSM can be found in the vignette and help pages.

Copy Link

Version

Install

install.packages('SSM')

Monthly Downloads

156

Version

1.0.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Peter Curtis

Last Published

July 4th, 2017

Functions in SSM (1.0.1)

compute.covariance.from.distance

Compute unscaled covariance matrix from a supplied distance matrix and length parameter.
compute.interactions

Compute Total interaction indices and Sobol indices for higher order interactions.
compute.specific.interaction

Compute the Sobol index for a given interaction.
compute.specific.total.interaction

Compute Total interaction variance
compute.main.effects

Compute main effects
compute.residuals

Compute the Leave-One-Out error at all design points.
SSM-class

An S4 class to represent a smooth supersaturated model
SSM

SSM: A package for fitting smooth supersaturated models (SSM).
comb

Generate all desired exponent vectors of a given degree.
compute.covariance

Compute the unscaled covariance matrix.
construct.P.1d

Construct the change of basis matrix from univariate monomials to Legendre polynomials.
construct.P

Construct the change of basis matrix from multivariate monomials to Legendre polynomials.
likelihood.plot

Plot the concentrated likelihood of an SSM.
construct.dmm

Construct the design model matrix
degl

Construct matrix of exponent vectors.
new.distance

Compute the distance matrix of an SSM design.
optimize.by.interval.maximum

Optimize concentrated likelihood.
lineij

Average the values in a vector between two cutoff points specified by a separate vector.
construct.K.1d

Construct the K matrix for a given univariate basis.
construct.K

Construct the K matrix for a given multivariate basis.
partial.deriv.ssm

Compute second partial derivative of a smooth supersaturated model at all design points.
plot.SSM

Plot smooth supersaturated model main effects
transform11

Transform a design to [-1, 1]^d
update.sensitivity

Update an SSM object with the term variances and Sobol indices
compute.total.effects

Compute Total effects
concentrated.likelihood

Compute the concentrated likelihood of a covariance matrix.
identify.main.effect.terms

Identify main effect terms
identify.total.effect.terms

Identify total effect terms
estimate.GP

Estimate the parameters of the metamodel error estimating GP.
find.theta

Compute the SSM vector of parameters.
fit.ssm

Fit a smooth supersaturated model
get.K.element

Compute entry of K matrix.
show,SSM-method

Summarise SSM class object
smoothness.over.design

Compute the smoothness of an SSM at all design points.
predict.SSM

Point prediction of smooth supersaturated models.
sensitivity.plot

Plot the sensitivity indices of a smooth supersaturated model.