You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MCMC Sampling of partially-observed multivariate normal nodes (#1612)
* added getMixedDataNodeNames method for models
* removed comments from NEWS
* partial_mvn (#1543)
`partial_mvn` sampler, to have the code here for posterity.
* fixed unlist for graph node ids
* updates
* updates
* updates
* updates
* removed extraneous tests of partial_mvn sampler
* updates per comments on PR
* partial_mvn sampler can assign barker sampler
* Use Cholesky of Sigma22 in partial_mvn_pp.
* fixed dimension mistake
* Use Cholesky in sampler_partial_mvn_pp.
* Add more testing for sampler_partial_mvn.
* fix spacing again
* remove extra tests, and fix use of expect_success
* added caching of sigma and mu in partial_mvn_pp sampler
* correction in caching calculations
* Add partial_mvn_pp test.
---------
Co-authored-by: Christopher Paciorek <paciorek@stat.berkeley.edu>
if(model$getDistribution(target) !='dmnorm') stop('The node ', target, ' is parially observed. NIMBLE only handles this case for multivariate normal distibutions.')
3507
+
if(!model$isMixedData(target)) stop('The target node ', target, ' is not partially observed.')
#' Details of the MCMC sampling algorithms provided with the NIMBLE MCMC engine; HMC samplers are in the \code{nimbleHMC} package and particle filter samplers are in the \code{nimbleSMC} package. Additional details, including some recommendations for samplers that may perform better than the samplers that NIMBLE assigns by default are provided in Section 7.11 of the User Manual.
#' The posterior_predictive sampler functions by simulating new values for all downstream (dependent) nodes using their conditional distributions, as well as updating the associated model probabilities. A posterior_predictive sampler will automatically be assigned to all trailing non-data stochastic nodes in a model, or when possible, to any node at a point in the model after which all downstream (dependent) stochastic nodes are non-data.
3882
4016
#'
3883
4017
#' The posterior_predictive sampler accepts no control list arguments.
4018
+
#'
4019
+
#' @section partial_mvn sampler:
4020
+
#'
4021
+
#' The partial_mvn sampler is designed to sample multivariate normal distributions that are partially observed. That is, some dimensions of the target node are observed data values, some dimensions are not data. Sampling is accomplished using either univariate or multivariate random walk Metropolis Hastings of the unobserved dimensions, as determined by the \code{multivariateNodesAsScalars} argument.
4022
+
#'
4023
+
#' The \code{partial_mvn} sampler accepts the following control list elements:
4024
+
#' \itemize{
4025
+
#' \item multivariateNodesAsScalars. A logical argument, specifying whether the sampler should sample the unobserved parts of a partially observed node jointly or independently (default = FALSE).
0 commit comments