postpri.plot: Posterior/Prior Heligman-Pollard parameter distribution plot

Description Usage Arguments Value References See Also Examples

View source: R/postpri.plot.R

Description

Produces an 8 panel plot of both the prior and posterior distribution for the eight parameters of the Heligman-Pollard model

Usage

1
2
3
postpri.plot(..., prior, hpp, box = FALSE, type = "l", 
line.col = c("black", "red"), line.bound = TRUE, 
rowcol = c(2, 4))

Arguments

...

Arguments to be passed to par

prior

A n x 8 matrix containing the prior distribution for each of eight Heligman-Pollard parameters (8 columns)

hpp

An matrix containing the posterior distribution for each of the eight Heligman-Pollard parameters

box

If TRUE, the plot will appear as box plots instead of Kernel density lines

type

Same as type in par. Sets the line type when the plot is the Kernel density

line.col

The line color for the plot. The first argument is the color for the prior and the second is for the posterior.

line.bound

If TRUE, will plot a box represneting the prior density

rowcol

A vector describing the number of rows and columns of the plot. These arguments are passed to mfrow in par.

Value

A plot graphing the prior and posterior distribution of the Heligman Pollard parameters

References

Heligman, Larry and John H. Pollard. 1980 "The Age Pattern of Mortality." Journal of the Institute of Actuaries 107:49–80.

Poole, David and Adrian Raftery. 2000. "Inference for Deterministic Simulation Models: The Bayesian Melding Approach." Journal of the American Statistical Association 95:1244–1255.

Raftery, Adrian and Le Bao. 2009. "Estimating and Projecting Trends in HIV/AIDS Gen- eralized Epidemics Using Incremental Mixture Importance Sampling." Technical Report 560, Department of Statistics, University of Washington.

See Also

hp.bm.imis, par, density, boxplot

Examples

1
2
3
4
5
6
7
8
##load a prior distribution##
data(HPprior)
##obtain and posterior distribution##
result <- hp.bm.imis(prior=q0, K=10, nrisk=lx, ndeath=dx) 

##plot them##
postpri.plot(prior=q0, hpp=result$H.final)
postpri.plot(prior=q0, hpp=result$H.final, box=TRUE)

Example output

Loading required package: MASS
Loading required package: mvtnorm
Loading required package: corpcor
Loading required package: numDeriv
Loading required package: boot
  Low CI Median High CI
1  0.010  0.017   0.023
2  0.087  0.221   0.356
3  0.081  0.123   0.171
4  0.097  0.106   0.115
5  3.910  5.708   7.494
6 37.982 40.271  42.660
7  0.001  0.003   0.004
8  1.056  1.070   1.084

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