View source: R/observation_models.R
missing_data_model | R Documentation |
Function to sample missing data given model parameters.
missing_data_model(observation_model_parameters, MegaLMM_state = list())
observation_model_parameters |
List of parameters necessary for the data model. Here, a Matrix of coordinates of NAs in Y |
MegaLMM_state |
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. |
Y |
data matrix n_Y x p_Y |
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.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.