Description Usage Arguments Value Warning Note References See Also Examples
Performs the optimizer step in the IMIS procedure for the eight Heligman-Pollard parameters
1 2 | loop.optim(prior, nrisk, ndeath, d = 10, theta.dim = 8,
age = c(1e-05, 1, seq(5, 100, 5)))
|
prior |
A matrix containing the prior |
nrisk |
A vector containing the number of persons at risk in each age group |
ndeath |
A vector containing the number of deaths in each age group |
d |
Number of optimizer iterations |
theta.dim |
Number of columns of the prior (This should be 8 if estimating all parameters. Functionality for estimation a limited number of parameters does not exist yet.) |
age |
A vector containing the ages at which each age interval begins |
opt.mu.d |
A matrix containing the local optimums resulting from the optimizer step. Each local optimum contains a set of 8 parameter values. |
opt.cov.d |
A array containing the covariance matrix for each of the local optimums |
d.keep |
The number of local optimums found whose likelihood is greater than the maximum likelihood from the prior |
theta.new |
The set of parameters from the prior with the greatest weight as calculated with prior.likewts |
log.like.0 |
A vector containing a likelihood for each row of the prior |
wts.0 |
A vector containing an importance weight for each row of the prior |
If the likelihood for the initial local maximum does not exceed the highlest likelihood from the prior, a warning will be issued.
Occasionally, this step fails to produce an initial local maximum that exceeds the highest likelihood of the prior and a warning is issued. Usually drawing a new prior or selecting a different algorithm solves this problem.
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.
1 2 3 4 5 6 7 8 | #Generate a prior and numbers of death and persons at risk#
## Not run: q0 <- prior.form()
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)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.