missing_data_model.Rd
Function to sample missing data given model parameters.
missing_data_model(observation_model_parameters, MegaLMM_state = list())
List of parameters necessary for the data model. Here, a Matrix of coordinates of NAs in Y
a MegaLMM_state object. Generally, only current_state and data_matrices is used. If empty, will return a default set of parameters of the appropriate size for model initialization.
data matrix n_Y x p_Y
list of data_model variables including:
state a list of parameters associated with the data_model. Here, only the matrix Eta
posteriorSample_params a list of parameter names to record posterior samples of
posteriorMean_params a list of parameters to record the posterior mean, but not save individual posterior samples
This is also a template for data_model
functions.
The function should draw a posterior sample for Eta (the (potentially) latent data on the linear scale) given the factor model and the observed data. It returns a list with Eta and any other variables associated with the data_model. These variables are added to current_state, but are not currently saved in Posterior
Initial values, hyperparameters, and any helper functions / parameters can be passed
in observation_model_parameters
.
When run with an empty current_state
and data_matrices == NULL
, it should return
a matrix Eta of the correct dimensions, but the values are unimportant.