It seems that the diagonal of the $Hessian results returned are used as the Error Estimate in summary. Running the homepage model, pathic version we get:
name matrix row col parameter estimate error estimate
1
2
3
4
5
6
7
8
9
10
and these values come from $hessian
$hessian
What is printed as $Hessian is the Cholesky decomposition of it, so what should really go in the Error Estimate column is
sqrt(diag(solve(t(factorresult@output$hessian) %*% factorresult@output$hessian )))
0.010674776 0.012604163 0.014016030 0.016688139 0.018605535 0.001966411 0.001975071 0.002205340 0.002347757 0.002583113
This jives reasonably well with bootstrap estimates (thx to the handy cov.wt function!):
mles<-function(dataset,wt){
manifests <- names(dataset)
latents <- c("G")
covwt<-cov.wt(dataset,wt)
mlevals<-mxRun(mxModel("One Factor", type="RAM",
manifestVars = manifests,
latentVars = latents,
mxPath(from=latents, to=manifests),
mxPath(from=manifests, arrows=2),
mxPath(from=latents, arrows=2,
free=F, values=1.0),
mxData(covwt$cov, type="cov",
numObs=500)))
return(as.vector(mlevals@output$estimate))}
boot(demoOneFactor,mles,R=1000)
Bootstrap Statistics :
original bias std. error
t1* 0.38841392 0.0084411481 0.008744156
t2* 0.49523971 0.0081500273 0.010768885
t3* 0.57578325 0.0008155712 0.012274162
t4* 0.69536404 0.0070740688 0.013864563
t5* 0.78976444 0.0059875654 0.014175315
t6* 0.03943445 0.0013193612 0.001660683
t7* 0.04021663 -0.0022253005 0.001440713
t8* 0.04123489 -0.0004473884 0.001870993
t9* 0.03662419 0.0027992703 0.002094885
t10* 0.03458172 0.0017000842 0.001910026
Accordingly, where $hessian is now in the output, we should print
t(factorresult@output$hessian) %*% factorresult@output$hessian
and
sqrt(diag(solve(t(factorresult@output$hessian) %*% factorresult@output$hessian )))
should go in the Error Estimate column
This may get messed up in the presence of non-linear constraints!
#1
Fixed in revision 762. The thing returned by the optimizer is now named "hessianCholesky". The output list in addition has an element named "hessian" that is the Hessian matrix. And the error estimates are computed correctly (unless there are non-linear constraints, this has not been tested).
Log in or register to post comments
#2
Automatically closed -- issue fixed for 2 weeks with no activity.
Log in or register to post comments