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" <>
To   "''" <>
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?


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

		-----Original Message-----
		From:	Stephen P. Jenkins []
		Sent:	Thursday, October 10, 2002 11:48 AM
		Subject:	st: How to reference tempvars across ML

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

		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
		myp1_ll.ado in which I do calculations referring to each
		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
		(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
		created, but again I couldn't get this to work. 

		thanks for any advice and suggestions.
		Professor Stephen P. Jenkins <>
		Institute for Social and Economic Research (ISER)
		University of Essex, Colchester, CO4 3SQ, UK
		Tel: +44 (0)1206 873374. Fax: +44 (0)1206 873151.

		*   For searches and help try:
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index