Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

RE: st: R: bootstrap


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: R: bootstrap
Date   Thu, 15 Jul 2010 23:22:33 +0200

<>

Sam can also omit the -rclass- declaration and simply have -bs- pick up the results left behind by -summ-:


***********
cap pr drop juan
webuse lbw, clear
 
prog juan
 	tempvar diff m0hat m1hat
	logit low age lwt if smoke, nolog
 	predict `m1hat'
	logit low age lwt if !smoke, nolog
 	predict `m0hat'
 	gen `diff'=`m1hat'-`m0hat'
 	su `diff', mean
end

bs taohat=r(mean), reps(100) nodrop: juan
***********


HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maarten buis
Sent: Donnerstag, 15. Juli 2010 22:53
To: statalist@hsphsun2.harvard.edu
Subject: RE: st: R: bootstrap

--- On Thu, 15/7/10, sun samn wrote:
> it works well, but get this error message at the end:
> insufficient observations to compute bootstrap standard
> errors.

use the -nodrop- option, as in:

bs taohat=r(taohat), nodrop :juan

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/


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