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]
Re: st: gllamm syntax
From
Debs Majumdar <[email protected]>
To
[email protected]
Subject
Re: st: gllamm syntax
Date
Wed, 3 Nov 2010 16:13:00 -0700 (PDT)
Thanks Mary. You cleared a lot of my doubts with the gllamm syntax.
-Joey
----- Original Message ----
From: Mary E. Mackesy-Amiti <[email protected]>
To: [email protected]
Sent: Wed, November 3, 2010 9:13:37 AM
Subject: Re: st: gllamm syntax
On 11/1/2010 5:14 PM, Shubhabrata Mukherjee wrote:
> Hi,
>
> I am trying to run gllamm for a 3-level nested model (patients nested
>within
> doctors within clinics). I have 4 patient level covariates (gender, age, race
> and education)& 1 doctor level covariate (specialty). I am not sure about the
> correct syntax for running a random coefficient model. Can anyone take a look
> and point me to the right syntax. Here's what I used which is wrong.
>
> ***********
>
> gen byte one = 1
> eq cons : one
> eq gen : new_gen
> eq race : new_race
> eq educ : edulvl
> eq age : age1
>
> gllamm zeta1 new_gen age1 edulvl new_race specialty, i(docid clinicid) nrf(1
8)
> ///
> eqs(cons cons new_gen cons new_race cons edulvl cons age1)
>
> *****
> I get the following error message:
>
> equation new_gen not found
> r(111);
>
> *****
1. equation new_gen is not found because the equation name is "gen"
2. As I understand it,
gllamm zeta1 new_gen age1 edulvl new_race specialty, i(docid clinicid) nrf(1 5)
///
eqs(cons cons gen race educ age)
would specify a 3-level model with random intercept at the doc level and random
intercept & random slopes on gender, race, education and age at the clinic level
(is this is what you want?)
> If I want to enter a random effect (intercept and slope) for doctor specialty,
> what will be the modification. Also is there a way to make it run faster using
> the `nip' command?
>
>
eq cons : one
eq spec : specialty
gllamm zeta1 new_gen age1 edulvl new_race specialty, i(docid clinicid) nrf(2 1)
///
eqs(cons spec cons)
would specify a model with fixed effects for patient variables, random intercept
and random slope on specialty at the doc level, and random intercept at the
clinic level.
3. I believe nip() is used to increase the number of integration points for
better precision
4. equivalently,
xtmixed zeta1 new_gen age1 edulvl new_race specialty || clinicid: || docid:
specialty
-- Mary Ellen Mackesy-Amiti, Ph.D.
Research Assistant Professor
Community Outreach Intervention Projects (COIP)
School of Public Health m/c 923
Division of Epidemiology and Biostatistics
University of Illinois at Chicago
ph. 312-355-4892
fax: 312-996-1450
*
* 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/
*
* 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/