calc_x_posterior: Calculate the posterior density of x

Description Usage Arguments Value

View source: R/multivariate_models.R

Description

Calculate the posterior probability p(x|y,theta_x,theta_y) for the mixed cumulative probit model at the points in xcalc given the response vector y. The calculation is for a single observation. If the normalization is done, xcalc is assumed to be evenly spaced.

Usage

1
2
3
4
5
6
7
8
9
calc_x_posterior(
  y,
  th_x,
  th_y,
  mod_spec,
  xcalc = c(),
  normalize = T,
  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

xcalc

A vector of ages at which to calculate the posterior probability

normalize

Whether or not to normalize to integrate to 1 (default: TRUE).

seed

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

Value

A vector of posterior probabilities


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