Description Usage Arguments Details Value Author(s) References See Also Examples
Parameter estimation using Monte Carlo local likelihood
1 2 3 4 5 |
data |
posterior samples of model parameters.
a |
prior.func |
a prior function. An argument should be a vector of parameter values and a return value should be the log prior density for those parameter values. |
alp |
a real value between 0 and 1. α takes a value between 0 and 1, which is the nearest neighbor bandwidth with the kth smallest distance d where k = \lfloor n α \rfloor and d(x, x_{i}) = | x - x_{i} | with the sample size n |
method |
an optimization method to be used in maximizing the approximation to the unnormalized log-likelihood.
Options from |
lower, upper |
bounds on the variables for the L-BFGS-B method in |
control |
a list of control parameters. See control options for |
use.locfit |
logical. If TRUE, |
con.manual |
a list. An optimization method for finding the polynomial coefficients, lower and upper bounds on the variables for the L-BFGS-B method, and a list of control parameters when |
Nested maximizations in Step 2 in the Monte Carlo local likelihood estimation.
It makes use of the R package locfit
and the R function optim
.
The posterior samples should be on the real line (e.g., variance parameters should be on the log-scale).
The prior distributions (provided as a form of prior.func
) should be the same as those used for obtaining the posterior
samples of the model parameters.
For details, see Section 2 in Jeon et al. (2012).
mcll_est
returns a list of the following components,
par |
parameter estimates on the original scale. |
value |
value of the function corresponding to |
counts |
a two-element integer vector giving the number of calls to function and gradient, respectively. |
convergence |
an integer code. 0 indicates successful completion.
For possible error codes, see the document for |
message |
a character string giving any additional information returned by |
Minjeong Jeon <jeon.117@osu.edu>
Jeon, M., Kaufman, C., and Rabe-Hesketh, S. (2014). Monte Carlo local likelihood for approximate MLE of complex models. Under revision.
Loader, C. (2012). locfit: Local regression, likelihood, and density estimation. Downloadable from
http://cran.r-project.org/web/packages/locfit/index.html
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## example
# posterior samples
data(samp)
# prior function
prior.func <- function(vec.t) {
sum(dnorm(vec.t, m= c(0,0,0,0, -0.9870405, -0.9870405) ,
sd=c(100,100,100,100, 1/0.766672, 1/0.766672) , log=TRUE))
}
## parameter estimation
run1 <- system.time(
result1 <- mcll_est(data=samp, prior.func= prior.func, alp=0.7,
method = "BFGS", control= list(maxit=10000))
)
# result1$par
# b0 b1 b2 b3 tau0 tau1
#[1,] 0.9275766 -2.871686 -0.6488625 3.589313 0.08118962 0.148478
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.