Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: bootstrap help


From   "Patrick Sturgis" <[email protected]>
To   <[email protected]>
Subject   st: bootstrap help
Date   Fri, 11 Apr 2003 22:21:02 +0100

Stata 7.0

I'm having problems getting a bootstrap to work. I'm trying to get standard
errors for the difference between two Cronbach's alpha coefficients. I've
used the example of bootstrapping the ratio of two means from the stata 7
manual (A-G p 171) as a template to produce the following ado file (bef* are
the first 4 variables and aft* the second 4 that I wish to compare):

program define alphatest
	version 7.0
	if "'1'" == "?" {
		global s1 "alphatest"
		exit
	}
	tempname y
	alpha bef1 bef2 bef3 bef4
	scalar 'y' = r(alpha)
	alpha aft1 aft2 aft3 aft4
	post '1' ('y' - 'r(alpha)')
end

Every time I run it (bstrap aphatest, reps(100)  I get the following error
message:

unexpected	end of file
"alphatest	?" returned:
unexpected	end of file

I have stored the ado file in my c:/stata/personal folder. Any ideas where
I'm going wrong? Thanks

Patrick

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