Statalist


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

st: RE: simulate


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: simulate
Date   Fri, 4 Sep 2009 15:54:01 +0100

You didn't call -logistic-. Hence there is nothing to feed on. 
Rule 0: Check your code! 

Nick 
n.j.cox@durham.ac.uk 

Andrzej Niemierko

I am trying to validate my logistic regression model by calculating a
distribution of area under the ROC curve for bootstrap samples of my
original data. After estimation using -logistic command I can run my
little
program below several times without a problem and getting what I want.

capture program drop mysim
program define mysim
    preserve
    bsample
        lroc, nograph
    restore
end

However, when I try to use the -simulation command it looks as my model
is
dropped from memory:

simulate area=r(area), reps(100): mysim

last estimates not found
an error occurred when simulate executed mysim
r(301);

Using -outsample option for lroc doesn't change the behavior of
-simulate (I
get the same error message) but it is not allowed for just running mysim
program (with error message: option outsample not allowed
r(198);).


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index