Predict missing values from the fitted DPMM.
Usage
predict_dpmm_fit(
object,
newdata,
samples = seq(1000, 2500, 100),
seed = NULL,
...
)Value
A list with n entries for n rows with missingness, each entry is a dataframe with the sampled missing values, in the same row order as 'newdata'. Continuous values are automatically converted back to their original scale, regardless of whether the model was fitted with 'standardise = TRUE'.
Examples
if (FALSE) { # \dontrun{
## load dataset
data(dataset_1)
## fit model
posteriors <- runModel(dataset_1,
mcmc_iterations = 100,
L = 6,
mcmc_chains = 2,
standardise = TRUE)
## introduce missing data
rows <- 501:550
dataset_missing <- dataset_1
dataset_missing_predict <- dataset_missing[rows,]
dataset_missing_predict[,1] <- as.numeric(NA)
# predict missing values
posteriors.dpmmfit <- predict_dpmm_fit(posteriors,
dataset_missing_predict,
samples = c(1:100),
seed = 1)
} # }