Closed seonghobae closed 7 years ago
Patched. Also note: Monte Carlo EM algorithms never really "converge", unless the stochastic draws are extremely large. Best just to treat those as approximations.
# tried to another condition after patch 76fbaf4
> mirt(expand.table(LSAT7), 1, method = 'MCEM', SE = T, SE.type = 'central')
Iteration: 500, Log-Lik: -2659.691, Max-Change: 0.04392
EM cycles terminated after 500 iterations.
Calculating information matrix...
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), :
'data' must be of a vector type, was 'NULL'
> mirt(expand.table(LSAT7), 1, method = 'QMCEM', SE = T, SE.type = 'central')
Iteration: 28, Log-Lik: -2658.807, Max-Change: 0.00010
Calculating information matrix...
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), :
'data' must be of a vector type, was 'NULL'
>
> mirt(expand.table(LSAT7), 1, method = 'MCEM', SE = T, SE.type = 'crossprod')
Iteration: 500, Log-Lik: -2658.875, Max-Change: 0.01416
EM cycles terminated after 500 iterations.
Calculating information matrix...
Error in computeItemtrace(pars = pars[[g]], Theta = Theta, itemloc = itemloc, :
Not compatible with requested type: [type=NULL; target=double].
> mirt(expand.table(LSAT7), 1, method = 'QMCEM', SE = T, SE.type = 'crossprod')
Iteration: 28, Log-Lik: -2658.807, Max-Change: 0.00010
Calculating information matrix...
Error in computeItemtrace(pars = pars[[g]], Theta = Theta, itemloc = itemloc, :
Not compatible with requested type: [type=NULL; target=double].
>
> mirt(expand.table(LSAT7), 1, method = 'MCEM', SE = T, SE.type = 'sandwich')
Iteration: 500, Log-Lik: -2658.822, Max-Change: 0.01721
EM cycles terminated after 500 iterations.
Calculating information matrix...
Error in computeItemtrace(pars = pars[[g]], Theta = Theta, itemloc = itemloc, :
Not compatible with requested type: [type=NULL; target=double].
> mirt(expand.table(LSAT7), 1, method = 'QMCEM', SE = T, SE.type = 'sandwich')
Iteration: 28, Log-Lik: -2658.807, Max-Change: 0.00010
Calculating information matrix...
Error in computeItemtrace(pars = pars[[g]], Theta = Theta, itemloc = itemloc, :
Not compatible with requested type: [type=NULL; target=double].
>
> mirt(expand.table(LSAT7), 1, method = 'MCEM', SE = T, SE.type = 'Fisher')
Iteration: 500, Log-Lik: -2658.859, Max-Change: 0.01054
EM cycles terminated after 500 iterations.
Calculating information matrix...
Error in computeItemtrace(pars = pars, Theta = Theta, itemloc = itemloc, :
Not compatible with requested type: [type=NULL; target=double].
> mirt(expand.table(LSAT7), 1, method = 'QMCEM', SE = T, SE.type = 'Fisher')
Iteration: 28, Log-Lik: -2658.807, Max-Change: 0.00010
Calculating information matrix...
Error in computeItemtrace(pars = pars, Theta = Theta, itemloc = itemloc, :
Not compatible with requested type: [type=NULL; target=double].
>
> mirt(expand.table(LSAT7), 1, method = 'MCEM', SE = T, SE.type = 'complete')
Iteration: 500, Log-Lik: -2658.831, Max-Change: 0.00739
EM cycles terminated after 500 iterations.
Calculating information matrix...
Call:
mirt(data = expand.table(LSAT7), model = 1, SE = T, SE.type = "complete",
method = "MCEM")
Full-information item factor analysis with 1 factor(s).
FAILED TO CONVERGE within 1e-04 tolerance after 500 MCEM iterations.
mirt version: 1.24.3
M-step optimizer: BFGS
Number of Monte Carlo points: 1498
Log-likelihood = -2658.831
Estimated parameters: 10
AIC = 5337.663; AICc = 5337.885
BIC = 5386.74; SABIC = 5354.98
G2 (21) = 31.75, p = 0.062
RMSEA = 0.023, CFI = 0.939, TLI = 0.924
> mirt(expand.table(LSAT7), 1, method = 'QMCEM', SE = T, SE.type = 'complete')
Iteration: 28, Log-Lik: -2658.807, Max-Change: 0.00010
Calculating information matrix...
Call:
mirt(data = expand.table(LSAT7), model = 1, SE = T, SE.type = "complete",
method = "QMCEM")
Full-information item factor analysis with 1 factor(s).
Converged within 1e-04 tolerance after 28 QMCEM iterations.
mirt version: 1.24.3
M-step optimizer: BFGS
EM acceleration: Ramsay
Number of quasi-Monte Carlo points: 5000
Information matrix estimated with method: complete
Condition number of information matrix = 5.364449
Second-order test: model is a possible local maximum
Log-likelihood = -2658.807
Estimated parameters: 10
AIC = 5337.614; AICc = 5337.836
BIC = 5386.691; SABIC = 5354.931
G2 (21) = 31.7, p = 0.0627
RMSEA = 0.023, CFI = 0.939, TLI = 0.924
Thanks for the test cases. Behaviour should be better now.
Hi Phil,
I met these messages when I try ty estimate standard error in my model with (Q)MCEM methods.
Here is my work environment informations.
Seongho