Per Hao's post http://openmx.psyc.virginia.edu/thread/1061 there is definitely odd behavior with omxMnor() with singular and non-positive definite covariance matrices. I seem to remember that Genz's integration routines were extended to handle positive semi-definite matrices (one or more eigenvalues of zero) by reducing the dimensionality of the problem. However, the answer is clearly wrong in this case:
> omxMnor(array(1,dim=c(2,2)),cbind(0,0),cbind(-Inf,-Inf),cbind(0,0))
[,1]
[1,] 0.375
(should be .5)
The behavior for negative definite matrices is less clear - we should probably throw an error, or at least flag to the optimizer that we are in infeasible region. At present it gives a value which is not correct:
> omxMnor(array(c(1,2,2,1),dim=c(2,2)),cbind(0,0),cbind(-Inf,-Inf),cbind(0,0))
[,1]
[1,] 0.4262082
#1
> #allOrdinalResults <- polychoricMatrix(ordinalData,useDeviations=T)
> #summary(allOrdinalResults$estimatedModel)
> omxMnor(array(1,dim=c(2,2)),cbind(0,0),cbind(-Inf,-Inf),cbind(0,0))
[,1]
[1,] 0.5
>
>
> S<-diag(1,2);
> S[1,2]<-S[2,1]<-2
> omxMnor(S,cbind(0,0),cbind(-Inf,-Inf),cbind(0,0))
[,1]
[1,] 0.5
>
>
Log in or register to post comments
#2
Log in or register to post comments
#3
Log in or register to post comments