Bookmark and Share

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]

st: sb command + ereturn matrix


From   michela bia <michela.bia@ceps.lu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: sb command + ereturn matrix
Date   Thu, 12 Jan 2012 12:47:50 +0000

Dear all,
I wrote an e-class program applying the radial penalized spline methodology and saving the estimates in a matrix (ereturn matrix command).
I also made the bootstrap of standard errors, but the estimates don't seem to be saved in the matrix when I run the bs command 
(please note that they are saved in the local `DRFps' if I write mat li `DRFps'!!).

The error message is: statistic matrix(r(DRFps)) evaluated to missing in full sample
if I save the estimates writing : mat def DRFps = `DRFps' 

and it is: DRFps not found
if I write:  ereturn matrix DRFps = `DRFps'

May you please help me?
How can I save the results in the correct way using the bootstrap at the end of the code?

program define DRF, eclass
version 11

...
mat li `DRFps'

_00006C[1,10]
           c1         c2         c3         c4         c5         c6         c7         c8         c9
r1  17349.756  13332.923  11062.302  9614.0808  8676.7353  8095.0012  7776.8476  7664.3185  7708.5554

          c10
r1  7883.4903

ereturn matrix DRFps = `DRFps' 

if("`method'" == "radialpspline"){ 

bs "DRF `varlist' `if' `in', outcome(`outcome') treatment(`treatment') gpscore(`gpscore') dose(`dose') method(`method') family(`family') link(`link') vce(`vce') common(`common') numoverlap(`numoverlap') tpoints(`tpoints') npoints(`npoints') npercentiles(`npercentiles') `derivative' nknots(`nknots') knots(`knots') `standardized' estopts(`estopts')" DRFps=matrix(r(DRFps)), nowarn `options'

}

End


Thanks a lot in advance for your help!
All the best,
Michela


BTW - Reference:  'Semiparametric Regression', David Ruppert, M. P. Wand, R. J. Carroll July 2003

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index