# Smooth supersaturated models In SSM: Fit and Analyze Smooth Supersaturated Models

## Cross-validation

Cross-validation entails the use of the same model structure with many subsets of the full dataset. Rather than recompute the necessary objects each time (e.g. P, K, and so on) it is possible to pass a pre-existing SSM object to fit.ssm which will then use the same structure.

# ten point design in two factors
X <- matrix(runif(20, -1, 1), ncol = 2)
Y <- apply(X, 1, sum)
# fit SSM
s <- fit.ssm(X, Y);s
# fit SSM with same structure to first nine design points only
s1 <- fit.ssm(X[1:9, ], Y[1:9], ssm = s);s1

## Try the SSM package in your browser

Any scripts or data that you put into this service are public.

SSM documentation built on May 1, 2019, 10:09 p.m.