Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Shared Frailty including Level 2 variables
From
Lee Panas <[email protected]>
To
[email protected]
Subject
st: Shared Frailty including Level 2 variables
Date
Thu, 03 Nov 2011 16:46:01 -0400
I am trying to do hierarchical linear modeling in survival analysis and
I have gathered from the archives that this can be done in STATA using
STCOX and shared. What I want to know is how to include level-2 or group
variables in the model.
I have a sample of about 8,000 patients served in about 100 substance
abuse facilities. The dependent variable is time to arrest (TIMEARR)
after treatment
The primary independent variable is Engagement or ENGAGE. ENGAGE=1 if
the patient received three services in the first 45 days of treatment.
ENGAGE=0 otherwise. Co-variates include prior criminal justice
involvement (PRIORCJ 0/1), FEMALE (0/1) and about 20 others.
I want to control for clustering within facilty and to also estimate the
effect of facility-level variables such as facility size (FACSIZE) and
facility engagement rate (PCTENGAGE). I have controlled for clustering
using the SHARED command:
stset timearr, failure(arrested)
stcox engage pctengage priorcj female , shared(facility)
Is this correct? Do I need to indicate somehow that PCTENGAGE is a
level-2 variables or does STATA know this from the shared statement and
the fact that PCTENGAGE is constant within facility?
Thanks,
Lee
*
* 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/