# Fit a subset of the cartilage data, assuming a Laplace marginal distribution.
data(cartilage)
data.cart = as.matrix(cartilage)[1:100, ]
colnames(data.cart) = c("c.1.1", "c.2.1")
fit.lap = sklars.omega(data.cart, level = "balance", confint = "none",
control = list(dist = "laplace"))
summary(fit.lap)
# Simulate three datasets from the fitted model, and then display the
# head of the first dataset in matrix form.
sim = simulate(fit.lap, nsim = 3, seed = 42)
data.sim = t(fit.lap$data)
data.sim[! is.na(data.sim)] = sim[, 1]
data.sim = t(data.sim)
head(data.sim)
Run the code above in your browser using DataLab