Estimate MUPP person parameters given item responses, item parameters, and item properties.

estimate_mupp_thetas(
  resp,
  items,
  method = c("bfgs", "MCMC"),
  control = list(),
  ...
)

Arguments

resp

a data.frame of (at least) [person, item, resp]

items

a data.frame of (at least) [item, statement, dim, alpha, delta, tau]

method

the estimation method ("bfgs", "MCMC")

control

a list of parameters to control the algorithm. See details.

...

other parameters to pass to the method

Value

a list of [estimates, vars, hessian, loglik, iters] for MLE estimation or [estimates, sds] for MCMC estimation

Details

Method BFGS uses a modified BFGS algorithm, based on Li and Fukushima (2001), which includes modifications of the BFGS estimated hessian with demonstrated global convergence properties.

  • For BFGS, control parameters include

    eps

    convergence criterion, will converge if length of gradient is shorter than this value. Defaults to 1e-07.

    max_iters

    maximum number of iterations before convergence. Defaults to 100.

    n_starts

    number of random starts at different theta vectors (using latin hypercube samples. Defaults to 4.)

  • For MCMC, control parameters include

    n_iters

    total number of iterations.

    n_burnin

    number of iterations to throw away when calculating summary statistics.

    step_size_sd

    the standard deviation of the step size for subsequent Metropolis-Hastings draws.

References

  • Li & Dong-Hui (2001). A modified BFGS method and its global convergence in nonconvex minimization. Journal of Computational and Applied Mathematics, 129, 15-35.

See also

optimumLHS

Author

Steven Nydick, steven.nydick@kornferry.com

Examples

if (FALSE) {
set.seed(23523)

# simulate parameters and responses to the model
# (assumption is that params/resp will follow conventions)
params <- simulate_mupp_params(n_persons     = 10,
                               n_items       = 300,
                               n_dims        = 9,
                               max_item_dims = 2,
                               unidim_items  = TRUE)
resp   <- do.call(simulate_mupp_resp,
                  params)

# thetas for comparison
thetas <- tidyr::spread(params$persons,
                        key   = "dim",
                        value = "theta")[ , -1]

# estimating thetas using BFGS algorithm (one start for comparison purposes)
est_thetas_mle  <- estimate_mupp_thetas(resp    = resp$resp,
                                        items   = params$items,
                                        method  = "bfgs",
                                        control = list(n_starts = 1))

# correlating (super high correlations!)
diag(cor(thetas, est_thetas_mle$estimates))

# estimating thetas using MCMC algorithm
est_thetas_mcmc <- estimate_mupp_thetas(resp   = resp$resp,
                                        items  = params$items,
                                        method  = "mcmc",
                                        control = list(n_iters  = 1000,
                                                       n_burnin = 500))

# correlating with MLE thetas (even higher correlations!)
diag(cor(est_thetas_mle$estimates, est_thetas_mcmc$estimates))
}