Description Usage Arguments Details Value Author(s) References See Also Examples
Standard error estimation using Monte Carlo local likelihood
1 2 |
data |
posterior samples of model parameters.
a |
par |
MCLL parameter estimates on the original scale. |
H.prior |
Hessian matrix of the prior evaluated at |
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 to find the coefficients of the polynomial approximation
to the log-posterior at the MCLL estimates |
lower, upper |
bounds on the variables for the L-BFGS-B method in |
control |
a list of control parameters. See control options for |
Standard error estimation in the Monte Carlo local likelihood method. For details, see Section 3 in Jeon et al. (2012). The posterior samples and paramter values should be on the real line (e.g., variance parameters should be in the log-scale).
mcll_se
returns a vector containing standard error estimates for the MCLL parameter estimates par
.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ## example
# data preparation
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) )
)
par <- result1$par # original scale
## standard error estimation
# H.prior: analytical solution
p.var = c(100,100,100,100, 1/0.766672, 1/0.766672)^2
H.prior <- -diag(1/p.var)
# H.prior: numerical solution
# library(numDeriv)
# H.prior <- hessian(prior.func, par)
# SE estimation (NOT RUN)
#run2 <- system.time(
# se <- mcll_se(data=samp, par=par, H.prior = H.prior, alp=0.7,
# method= "Nelder-Mead" , control=list(maxit=20000))
#)
#se
# b0 b1 b2 b3 tau0 tau1
#0.4057844 0.5640063 0.4907643 0.6663096 0.3022842 0.2999727
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.