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 Actuaries107:49–80.
Poole, David and Adrian Raftery. 2000. "Inference for Deterministic Simulation Models: The Bayesian Melding Approach." Journal of the American Statistical Association95: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
##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)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(HPbayes)
Loading required package: MASS
Loading required package: mvtnorm
Loading required package: corpcor
Loading required package: numDeriv
Loading required package: boot
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/HPbayes/postpri.plot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: postpri.plot
> ### Title: Posterior/Prior Heligman-Pollard parameter distribution plot
> ### Aliases: postpri.plot
> ### Keywords: misc
>
> ### ** Examples
>
> ##load a prior distribution##
> data(HPprior)
> ##obtain and posterior distribution##
> result <- hp.bm.imis(prior=q0, K=10, nrisk=lx, ndeath=dx)
Low CI Median High CI
1 0.020 0.025 0.031
2 0.602 0.713 0.840
3 0.177 0.229 0.284
4 0.087 0.099 0.110
5 3.896 5.286 6.624
6 38.793 40.575 42.273
7 0.001 0.003 0.004
8 1.062 1.071 1.080
>
> ##plot them##
> postpri.plot(prior=q0, hpp=result$H.final)
> postpri.plot(prior=q0, hpp=result$H.final, box=TRUE)
>
>
>
>
>
> dev.off()
null device
1
>