marginal_hyperparameter_posterior: Marginal hyperparameter posterior

Description Usage Arguments Value

View source: R/05-posthoc-quantities.R

Description

Get the marginal density of a single coordinate of the hyperparameter vector theta using quadrature.

Usage

1
marginal_hyperparameter_posterior(j, ccfit, quantiles = c(2.5, 97.5)/100)

Arguments

j

Integer index indicating which marginal to evaluate. If theta is K-dimensional then this should be from 1 to K.

ccfit

Object of class ccfit returned by casecrossover()

quantiles

Vector of numbers between 0 and 1 representing quantiles of the marginal posterior that are to be estimated

Value

A list containing elements - margpost: dataframe of logged theta_j posterior values, evaluated on a grid of the same accuracy as those used to construct the full joint. - quantiles: dataframe containing the quantiles of the marginal posterior. Easier to do these here since they require a grid.


awstringer1/casecrossover documentation built on March 11, 2021, 4:41 a.m.