Statalist


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

Re: st: simulate


From   Andrzej Niemierko <aniemierko@PARTNERS.ORG>
To   Stata <statalist@hsphsun2.harvard.edu>
Subject   Re: st: simulate
Date   Fri, 04 Sep 2009 15:05:32 -0400

Maarten,
How would you do a similar simulation with -estat gof?
-estat gof doesn't allow varlist so, using your example:
-estat gof union, beta(b)
doesn't work.

Andrzej




On 9/4/09 11:11 AM, "Maarten buis" <maartenbuis@yahoo.co.uk> wrote:

> --- Andrzej Niemierko wrote:
>> 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:
> 
> *------------ begin example ----------------
> sysuse nlsw88, clear
> logit union south grade
> matrix b = e(b)
> 
> capture program drop mysim
> program define mysim, rclass
>     sysuse nlsw88, clear
>     bsample
>     lroc union, nograph beta(b)
>     return scalar area=r(area)
> end
> 
> simulate area=r(area), reps(100): mysim
> *-------------- end example ---------------
> ( For more on how to use examples I sent to statalist see:
> http://www.maartenbuis.nl/stata/exampleFAQ.html )
> 
> Hope this helps,
> Maarten
> 
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
> 
> http://www.maartenbuis.nl
> --------------------------
> 
> 
>       
> 
> *
> *   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/




The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

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