[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Mata in an rclass program to bootstrap
I tried to embed mata code in an r class program to bootstrap. The program starts
capture program drop welfareboot
program define welfareboot, rclass
version 10
it executes nlsur to estimate a parametric model
then
mata:
ndm = st_matrix("ndm")
pdm = st_matrix("pdm")
npar = st_matrix("nonpoor")
ppar = st_matrix("poor")
.
.
.
end
when I try to return scalars calculated by the mata program I get
return scalar cvnb = cvnbord
non r-class program may not set r()
r(151);
Is there a proper way to embed mata in a program to bootstrap that will not create this error?
Carl Nelson
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/