# dens.prior: Density of the prior In HPbayes: Heligman Pollard mortality model parameter estimation using Bayesian Melding with Incremental Mixture Importance Sampling

## Description

This function calculates the density of the prior distribution for the eight parameters of the Heligman Pollard model. The density is calculated using a uniform distribution. The lower bounds all default to 0 except parameter F, which has a default lower bound of 15. The upper bounds default to A-0.15, B-1, C-1, D-0.25, E-15, F-55, G-0.1, F-1.25.

## Usage

 ```1 2``` ```dens.prior(x, pri.lo = c(0, 0, 0, 0, 0, 15, 0, 0), pri.hi = c(0.15, 1, 1, 0.25, 15, 55, 0.1, 1.25)) ```

## Arguments

 `x` A 1 x 8 vector or n x 8 matrix containing values for the eight Heligman-Pollard Parameters `pri.lo` A vector giving the lower bounds of the uniform prior. Defaults to 0 for all parameters except F which has a default lower bound of 15. `pri.hi` A vector giving the upper bounds of the uniform prior. Defaults to A-0.15, B-1, C-1, D-0.25, E-15, F-55, G-0.1, F-1.25.

## Value

A scalar describing the density of the prior distribution

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```#Generate a prior distribution pri.lo = c(0, 0, 0, 0, 0, 15, 0, 0) pri.hi = c(0.15, 1, 1, 0.25, 15, 55, 0.1, 1.25) B0 <- 8000 q0 <- cbind(runif(B0, pri.lo, pri.hi), runif(B0, pri.lo, pri.hi), runif(B0, pri.lo, pri.hi), runif(B0, pri.lo, pri.hi), runif(B0, pri.lo, pri.hi), runif(B0, pri.lo, pri.hi), runif(B0, pri.lo, pri.hi), runif(B0, pri.lo, pri.hi)) density <- dens.prior(x=q0) ```

HPbayes documentation built on May 2, 2019, 5:53 a.m.