Posterior/Prior Heligman-Pollard parameter distribution plot

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)