Statalist


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

RE: st: RE: simulate


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: simulate
Date   Fri, 4 Sep 2009 16:10:08 +0100

That is, I believe, entirely consistent with my earlier point. 

Let's take this step by step: 

1. If you want a new ROC area for each new bootstrap sample that you
draw, you can only do that after the sample is drawn. 

2. That must therefore be done within your program, and all under the
aegis of -simulate-. 

Thus -mysim- must call -logistic-. 

Nick 
[email protected] 

Andrzej Niemierko

Nick,
I did call logistic before I ran -simulate or before I ran my little
program. I just didn't show it in my email. I also said that I get
correct
estimates of r(area) from -lroc as many times as I run my program but
not
when I use -simulate.
Andrzej

On 9/4/09 10:54 AM, "Nick Cox" <[email protected]> wrote:

> You didn't call -logistic-. Hence there is nothing to feed on.
> Rule 0: Check your code!
> 
> Nick 
> [email protected]
> 
> 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index