Published on *OpenMx* (http://openmx.psyc.virginia.edu)

By *neale*

Created *08/24/2011 - 12:56*

Wed, 08/24/2011 - 12:56 — neale [1]

### Jump to:

Project: | OpenMx |

Component: | Code |

Category: | bug report |

Priority: | normal |

Assigned: | tbrick |

Status: | active |

Description

Per Hao's post http://openmx.psyc.virginia.edu/thread/1061 [3] 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

**Links:**

[1] http://openmx.psyc.virginia.edu/users/neale

[2] http://openmx.psyc.virginia.edu/issue/2011/08/omxmnor-problem#comment-3329

[3] http://openmx.psyc.virginia.edu/thread/1061