Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: mata optimize problem
From
Stas Kolenikov <[email protected]>
To
[email protected]
Subject
Re: st: mata optimize problem
Date
Sat, 3 Jul 2010 13:08:47 -0500
set matalnum on
to see which line of your procedure generates the error. To make your
program well defended against bad inputs, you can code something like
if ( cols(A_inv) != rows( X ) ) {
printf( "{err}A_inv is not conformant to X"\n)
lndensity[,] = J( rows(lndensity), 1, . )
return
}
Note also that your observations lie on the straight line x==y. A more
sensible set of values might have been
gen xcoor = uniform()
gen ycoor = uniform()
producing points distribution U[0,1]^2.