sample_x_posterior: Sample from the posterior density of x

Description Usage Arguments Value

View source: R/multivariate_models.R

Description

Do Metropolis-Hastings sampling of the posterior probability p(x|y,theta_x,theta_y) for the mixed cumulative probit model given the response vector y.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sample_x_posterior(
  y,
  th_x,
  th_y,
  mod_spec,
  num_samp,
  thinning = 1,
  prop_rescale = 0.1,
  seed = NA
)

Arguments

y

The response vector for a single observation

th_x

Parameterization for prior on x

th_y

Parameterization for likelihood

mod_spec

The model specification

seed

An optional input seed to make sampling reproducibile (default: NA, not used)

xcalc

A vector of ages at which to calculate the posterior probability

Value

A vector of posterior probabilities


MichaelHoltonPrice/yada documentation built on Sept. 19, 2021, 11:27 p.m.