[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Mata in an rclass program to bootstrap

From   "Nelson, Carl" <>
To   "" <>
Subject   st: Mata in an rclass program to bootstrap
Date   Sun, 19 Jul 2009 08:33:55 -0500

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



ndm = st_matrix("ndm")
pdm = st_matrix("pdm")
npar = st_matrix("nonpoor")
ppar = st_matrix("poor")

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()

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:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index