Multivariate Gaussian Sampling for Heligman-Pollard model estimated via Bayesian Melding

Share:

Description

Samples the eight Heligman-Pollard parameters from the mvnorm distribution for each run of optimizer step where the likelihood for that run exceeds the maximum likelihood from the prior

Usage

1
2
samp.postopt(opt.cov.d, opt.mu.d,  d.keep, prior, B = 400, 
B0 = 8000, d = 10)

Arguments

opt.cov.d

An array containing a covariance matrix for each run of optimizer where the likelihood for that run exceeds the maximum likelihood from the prior

opt.mu.d

A matrix containing the results of the optimizer step

d.keep

Number of runs of optimizer where the likelihood for that run exceeds the maximum likelihood from the prior

prior

A matrix containing the prior distribution (see prior.form and prior.mle)

B

sample size at the importance sampling stage

B0

Sample size of the prior. This is equal to theta.dim*1000

d

Number of optimizer iterations

Details

For use within the function hp.bm.imis

Value

H.k

The prior plus new samples

H.new

The new samples from the multivariate normal

B1

The number of new samples - should be equal to B*d.keep

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: data(HPprior)
q0 <- HPprior
lx <- c(1974, 1906, 1860, 1844, 1834, 1823, 1793, 1700, 1549, 1361, 
1181, 1025, 870, 721, 571, 450, 344, 256, 142, 79, 41, 8)
dx <- c(68, 47, 16, 10, 13, 29, 92, 151, 188, 179, 156, 155, 147, 150, 
122, 106, 88, 113, 63, 38, 32, 8)
opt.result <- loop.optim(prior = q0, nrisk=lx, ndeath=dx)
    opt.mu.d <- opt.result$opt.mu.d
    opt.cov.d <- opt.result$opt.cov.d
    theta.new <- opt.result$theta.new
    d.keep <- opt.result$d.keep
    log.like.0 <- opt.result$log.like.0
    wts.0 <- opt.result$log.like.0
samp.po <- samp.postopt(opt.cov.d = opt.cov.d, opt.mu.d = opt.mu.d, 
        prior = q0, d.keep = d.keep)
## End(Not run)