LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 7 Sep 2007 09:27:22 -0700
Reply-To:     Robin High <robinh@UOREGON.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Robin High <robinh@UOREGON.EDU>
Subject:      Re: HLM longitudinal data analysis question
Comments: To: Joanne Brady <Brady@NDRI.ORG>
In-Reply-To:  A<46E04046.E7AC.0009.0@ndri.org>
Content-Type: text/plain; charset="us-ascii"

I'm having a problem with proc mixed. I'm trying to predict the number of injection drug users per 10,000 for 96 large metropolitan areas in each year from 1992-2002. I'm running 2 models with time specified differently in each. In model 1, my independent variable is year3, where the year 1992 has a value of -10 and the year 2002 has a value of 0. In model 2, my independent variable is year3, where the year 1992 has a value of 0 and the year 2002 has a value of 10.

By my understanding, UN (1,1) (shown below in the covariance parameter estimates results) should be the variance of the slope. Why is UN (1,1) modeled differently in Model 1 versus Model 2? In the solutions for fixed effects, why do the slopes not have the same absolute value?

Thanks very much for your help!

Joanne

CODE: Model 1: proc mixed data = center_today_difs2 method=ml covtest /*noclprint NOITPRINT NOINFO*/; where year ge 1992; class msa year; model idu_avgest_out = year3 /solution alpha = 0.05 ddfm = bw notest ; random year3 /subject=msa type=un ; repeated year / type=toep subject=msa ;

run ; quit ;

Model 2: proc mixed data = center_today_difs2 method=ml covtest /*noclprint NOITPRINT NOINFO */; where year ge 1992; class msa year; model idu_avgest_out = year2 /solution alpha = 0.05 ddfm = bw notest ; random year2 /subject=msa type=un ; repeated year / type=toep subject=msa ;

run ; quit ;

SAMPLE DATA FOR 1 MSA:

idu_avgest_ Obs MSA year out year2 year3

3 0080 1992 59.556 0 -10 4 0080 1993 53.981 1 -9 5 0080 1994 61.954 2 -8 6 0080 1995 55.767 3 -7 7 0080 1996 56.627 4 -6 8 0080 1997 57.764 5 -5 9 0080 1998 59.375 6 -4 10 0080 1999 69.893 7 -3 11 0080 2000 63.416 8 -2 12 0080 2001 74.109 9 -1 13 0080 2002 67.419 10 0

Joanne,

Try adding the 'intercept' term to both random statements, e.g.:

random intercept year3 /subject=msa type=un ;

Without it you are forcing all slopes for each MSA to be the one intercept reported on the Fixed Effect Solution table. And since your '0' point with each specification of year is different (i.e., where the lines for each MSA must intersect) the slopes will be different depending on which variable for year you enter. The 'intercept' option allows the intercept for each MSA to also freely vary.

Also, the REPEATED statement with TYPE=toep seems like it could be a bit much to handle the within MSA autocorrelation, when perhaps a type=ar(1) or toep(n) where choices for n of 2,3,4,.. 11 might work better (i.e., check what AIC or BIC report for the various values).

Robin High University of Oregon


Back to: Top of message | Previous page | Main SAS-L page