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

st: Hierarchical Survival Model, Survey commands for survival outcomes


From   "Li, Wenjun" <WLi1@Lifespan.org>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: Hierarchical Survival Model, Survey commands for survival outcomes
Date   Thu, 10 Oct 2002 11:56:36 -0400

I wonder if any of the Stata community has worked out survival models
involving covariates that have hierarchical structures, such as
state>county>town. Also, has "Svy" implemented survival analysis?

Thanks,


Wenjun Li
Biostatistics Research Center
Tufts-New England Medical Center
750 Washington Street, #63
Boston, MA 02111
Tel (617) 636 1603  Fax (617) 636 5560
Email: wli1@lifespan.org <mailto:wli1@lifespan.org> 

		-----Original Message-----
		From:	Stephen P. Jenkins [mailto:stephenj@essex.ac.uk]
		Sent:	Thursday, October 10, 2002 11:48 AM
		To:	statalist@hsphsun2.harvard.edu
		Subject:	st: How to reference tempvars across ML
programs?

		ML programs written in ado file form comprise a main program
and 
		another program (or programs) called each iteration to
evaluate the 
		likelihood. Advice please about how to reference in the
likelihood 
		evaluation program(s), temporary variables that are created
in the main 
		program.

		More details: 
		In myp1.ado I currently have code like
			generate z`i'`d' = uniform()
		generated in a loop, where `i' = 1,...,$M, and `d' =
1,...,$D (and both 
		$M, $D are user-defined).  The -ml- command in this file
calls 
		myp1_ll.ado in which I do calculations referring to each
variable 
		z`i'`d', again within a loop over `i' and `d'.

		I can make the program work in this way, but note that the
"z" prefix 
		means that I am generating permanent variables with a
specific name 
		(a Bad Thing as far as programming is concerned).
		How can I make these indexed variables temporary but still
refer to 
		them correctly?
		I've played around with using -tempvar- commands within
myp1.ado, but I 
		don't seem able to refer to these (suitably indexed) in
myp1_ll.ado. 
		(Note too Manual [P] macro entry, p. 133, that warns that
one cannot 
		suffix temporary variables with additional characters and
use them.)
		Another idea was to use global macros to hold the variable
names 
		created, but again I couldn't get this to work. 

		thanks for any advice and suggestions.
		Stephen
		----------------------
		Professor Stephen P. Jenkins <stephenj@essex.ac.uk>
		Institute for Social and Economic Research (ISER)
		University of Essex, Colchester, CO4 3SQ, UK
		Tel: +44 (0)1206 873374. Fax: +44 (0)1206 873151.
		http://www.iser.essex.ac.uk

		*
		*   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/
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index