Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: model-based standardization


From   [email protected] (Kristin MacDonald)
To   [email protected]
Subject   RE: st: model-based standardization
Date   Tue, 05 Feb 2008 17:30:12 -0600

Garth Rauscher <[email protected]> asked about using -bootstrap, bca- with the
following program.

	prog dp
	cap drop pr0 pr1 dp
	logit Y X r2 r3 a2 a3
	ren X wasX
	g X=0
	predict pr0
	replace X=1
	predict pr1
	drop X
	ren wasX X
	g dp=pr1-pr0
	mean dp
	end

To use the -bca- option, the program must also work properly with -jackknife-.
In order for -jackknife- to leave one observation out in each replication, the
program needs to allow the -if- qualifier.  Garth can add the -syntax- command
to his program so that it will accept -if- as follows.

	prog dp 
	syntax [if]
	cap drop pr0 pr1 dp
	logit Y X r2 r3 a2 a3 `if'
	ren X wasX
	g X=0
	predict pr0 `if'
	replace X=1
	predict pr1 `if'
	drop X
	ren wasX X
	g dp=pr1-pr0 
	mean dp `if'
	end

	bs, bca : dp
	estat bootstrap, all

--Kristin
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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