--- On Wed, 12/9/09, Ryan <ryan.andrew.black@GMAIL.COM> wrote:
> From: Ryan <ryan.andrew.black@GMAIL.COM>
> Subject: Re: Help with panel data analysis
> To: SAS-L@LISTSERV.UGA.EDU
> Date: Wednesday, December 9, 2009, 5:48 AM
> On Dec 9, 1:49 am, stringplaye...@YAHOO.COM
> (Dale McLerran) wrote:
> > --- On Tue, 12/8/09, Kevin <kalsc...@GMAIL.COM>
> wrote:
> >
> >
> >
> >
> >
> > > From: Kevin <kalsc...@GMAIL.COM>
> > > Subject: Help with panel data analysis
> > > To: SA...@LISTSERV.UGA.EDU
> > > Date: Tuesday, December 8, 2009, 9:58 AM
> > > Hello,
> >
> > > I am new to this group and am hopeful that
> somebody can
> > > provide some
> > > help. I am also new to SAS, but need to use
> it to run
> > > the following
> > > panel analysis for part of my dissertation.
> >
> > > I have longitudinal data on physical activity in
> low back
> > > pain
> > > patients (20 measurements per participant) and
> am
> > > interested in
> > > evaluating 9 predictors. I want
> to be able
> > > to answer the question,
> > > "Which variables significantly predict physical
> activity in
> > > low back
> > > pain patients?"
> >
> > > Of the 9 predictors, 2 were also repeatedly
> measured, at
> > > the same
> > > intervals as physical activity. The other 7
> were
> > > assessed once.
> > > Additionally, I have demographic variables.
> All of
> > > the variables are
> > > continuous.
> >
> > > I believe I should be using proc mixed, with the
> following
> > > syntax. I
> > > have listed it generically with the type of
> variable
> > > instead of the
> > > variable names, hopefully to eliminate any
> confusion.
> >
> > > proc mixed;
> > > class [participant] [interval];
> > > model [outcome] = [interval] [demographic
> variables]
> > > [longitudinal
> > > predictor] [longitudinal predictor]
> [cross-sectional
> > > predictor] [cross-
> > > sectional predictor] [cross-sectional predictor]
> > > [cross-sectional
> > > predictor] [cross-sectional predictor]
> [cross-sectional
> > > predictor]
> > > [cross-sectional predictor]/ solution;
> > > repeat [interval];
> > > random intercept / subject = [participant] type =
> un
> > > solution;
> > > run;
> >
> > > In addition to being unsure of the general
> syntax, I am
> > > specifically
> > > confused on the class, repeat, random, subject,
> and type
> > > options.
> >
> > > Thanks,
> > > Kevin
> >
> > Kevin,
> >
> > Assuming that none of your predictor variables are
> categorical
> > and should be named on the CLASS statement, then your
> CLASS
> > and MODEL statements are constructed
> appropriately. However,
> > I would specify the option DDFM=kenwardroger on your
> MODEL
> > statement.
> >
> > Your RANDOM statement is also constructed
> reasonably. However,
> > the TYPE specification is peculiar, to say the
> least. When
> > the only random effect is a random intercept - a
> single column
> > in what is referred to as the G matrix - then the
> only
> > parameter for the random effects covariance matrix is
> a
> > variance of the intercept term. There is nothing
> for this
> > random effect to covary with. An unstructured
> covariance
> > matrix would be an q x q matrix with structure
> >
> > _
>
> _
> >
> | V11 V12
> V13 ... V1q |
> >
> | V21 V22
> V23 ... V2q |
> >
> | V31 V32
> V33 ... V3q |
> > |
> ... ...
> ... |
> >
> | Vq1 Vq2
> Vq3 ... Vqq |
> > -
>
> -
> >
> > Note that Vij=Vji so the above matrix is
> symmetric. Note,
> > too, that the variance matrix which you need to
> construct
> > can be specified as
> >
> > _ _
> >
> | V11 |
> > - -
> >
> > That would qualify as an unstructured covariance
> matrix. But
> > for a 1x1 matrix, we would not usually choose to
> specify that
> > the covariance matrix is unstructured. Because
> the covariance
> > matrix is 1x1, you don't need to specify any
> particular form
> > for it. Thus, you could write your random
> statement as:
> >
> > random intercept / subject =
> [participant] solution;
> >
> > Now, we come to the REPEATED statement. Your
> REPEATED
> > statement specification leaves much to be
> desired. First,
> > just as you did for the RANDOM statement, you need to
> > specify a subject. Within a subject, the
> residuals will be
> > correlated. Residuals for different subjects are
> assumed
> > to have no covariance. In addition, you really
> do want to
> > specify the structure of the residual covariance
> matrix.
> > Do you think that proximate observations will have a
> higher
> > correlation than observations which are more distant
> in
> > time? Then you might want to use one of the
> spatial
> > (SP(pow)(interval), SP(exp)(interval),
> SP(gau)(interval),
> > or some such) or an AR(1) covariance structure.
> Whether
> > you use a spatial covariance structure or an AR(1)
> > covariance depends on whether the time between
> measurements
> > is the same for all measurements. If you have a
> uniform
> > time between measurements, then the AR(1) covariance
> > structure would be specified. Otherwise, you
> would use a
> > spatial covariance structure. As an alternative
> to AR(1),
> > you might also specify a Toeplitz covariance structure
> for
> > an experiment in which observations have a uniform
> spacing
> > over time.
> >
> > Note that as long as all subjects are measured at
> common
> > times (or with a common interval between measurements
> on
> > the same subject), then you could always specify an
> > unstructured covariance matrix for the residual
> covariance
> > structure. Assuming that your experiment does
> record
> > observations on a consistent time frame for all
> subjects,
> > then I would suggest that you start out by modeling
> the
> > residual covariance using an unstructured covariance
> matrix.
> > You can observe whether there is a general pattern to
> the
> > residual covariance which would follow an AR(1) or
> Toeplitz
> > structure. If so, then re-estimate the model
> with one of
> > those structures. You can form a likelihood
> ratio test
> > to determine whether the AR(1) or Toeplitz covariance
> fits
> > the observed data.
> >
> > Thus, assuming a consistent longitudinal frame for
> all
> > subjects, you would probably first want to use the
> REPEATED
> > statement:
> >
> > repeated [interval] / subject =
> [participant]
> >
> type = un;
> >
> > HTH,
> >
> > Dale
> >
> > ---------------------------------------
> > Dale McLerran
> > Fred Hutchinson Cancer Research Center
> > mailto: dmclerra@NO_SPAMfhcrc.org
> > Ph: (206) 667-2926
> > Fax: (206) 667-5977
> > ---------------------------------------- Hide quoted
> text -
> >
> > - Show quoted text -
>
> Dale,
>
> To make sure I'm following, you recommend that the OP
> include both the
> random intercept statement and the repeated statement? That
> is, do you
> recommend he include the following two lines of code?:
>
> random intercept / subject = [participant] solution;
> repeated [interval] / subject = [participant] type = un;
> *assuming a
> consistent longitudinal frame
>
> Could the inclusion of both of these statements result in
> an
> overcorrection? I would consider only including the
> repeated
> statement, but I assume I'm missing something.
>
> Ryan
>
Ryan,
Yes, I would advocate inclusion of both the RANDOM and REPEATED
statements. It is possible to have a person-specific intercept
(which is accommodated by the RANDOM statement). Conditional
on the person-specific intercept, residuals which are proximate
in time may tend to be positive/negative to a similar degree.
Thus, even after inclusion of the RANDOM statement, there could
be structure in the residuals which needs to be accounted for.
Dale
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@NO_SPAMfhcrc.org
Ph: (206) 667-2926
Fax: (206) 667-5977
---------------------------------------
|
|
0
|
|
|
|
Reply
|
stringplayer_2 (1472)
|
12/9/2009 5:26:20 PM |
|
On Dec 9, 12:26=A0pm, stringplaye...@YAHOO.COM (Dale McLerran) wrote:
> --- On Wed, 12/9/09, Ryan <ryan.andrew.bl...@GMAIL.COM> wrote:
>
>
>
>
>
> > From: Ryan <ryan.andrew.bl...@GMAIL.COM>
> > Subject: Re: Help with panel data analysis
> > To: SA...@LISTSERV.UGA.EDU
> > Date: Wednesday, December 9, 2009, 5:48 AM
> > On Dec 9, 1:49 am, stringplaye...@YAHOO.COM
> > (Dale McLerran) wrote:
> > > --- On Tue, 12/8/09, Kevin <kalsc...@GMAIL.COM>
> > wrote:
>
> > > > From: Kevin <kalsc...@GMAIL.COM>
> > > > Subject: Help with panel data analysis
> > > > To: SA...@LISTSERV.UGA.EDU
> > > > Date: Tuesday, December 8, 2009, 9:58 AM
> > > > Hello,
>
> > > > I am new to this group and am hopeful that
> > somebody can
> > > > provide some
> > > > help. =A0I am also new to SAS, but need to use
> > it to run
> > > > the following
> > > > panel analysis for part of my dissertation.
>
> > > > I have longitudinal data on physical activity in
> > low back
> > > > pain
> > > > patients (20 measurements per participant) and
> > am
> > > > interested in
> > > > evaluating 9 predictors. =A0 I want
> > to be able
> > > > to answer the question,
> > > > "Which variables significantly predict physical
> > activity in
> > > > low back
> > > > pain patients?"
>
> > > > Of the 9 predictors, 2 were also repeatedly
> > measured, at
> > > > the same
> > > > intervals as physical activity. =A0The other 7
> > were
> > > > assessed once.
> > > > Additionally, I have demographic variables.
> > All of
> > > > the variables are
> > > > continuous.
>
> > > > I believe I should be using proc mixed, with the
> > following
> > > > syntax. =A0I
> > > > have listed it generically with the type of
> > variable
> > > > instead of the
> > > > variable names, hopefully to eliminate any
> > confusion.
>
> > > > proc mixed;
> > > > class [participant] [interval];
> > > > model [outcome] =3D [interval] [demographic
> > variables]
> > > > [longitudinal
> > > > predictor] [longitudinal predictor]
> > [cross-sectional
> > > > predictor] [cross-
> > > > sectional predictor] [cross-sectional predictor]
> > > > [cross-sectional
> > > > predictor] [cross-sectional predictor]
> > [cross-sectional
> > > > predictor]
> > > > [cross-sectional predictor]/ solution;
> > > > repeat [interval];
> > > > random intercept / subject =3D [participant] type =3D
> > un
> > > > solution;
> > > > run;
>
> > > > In addition to being unsure of the general
> > syntax, I am
> > > > specifically
> > > > confused on the class, repeat, random, subject,
> > and type
> > > > options.
>
> > > > Thanks,
> > > > Kevin
>
> > > Kevin,
>
> > > Assuming that none of your predictor variables are
> > categorical
> > > and should be named on the CLASS statement, then your
> > CLASS
> > > and MODEL statements are constructed
> > appropriately. =A0However,
> > > I would specify the option DDFM=3Dkenwardroger on your
> > MODEL
> > > statement.
>
> > > Your RANDOM statement is also constructed
> > reasonably. =A0However,
> > > the TYPE specification is peculiar, to say the
> > least. =A0When
> > > the only random effect is a random intercept - a
> > single column
> > > in what is referred to as the G matrix - then the
> > only
> > > parameter for the random effects covariance matrix is
> > a
> > > variance of the intercept term. =A0There is nothing
> > for this
> > > random effect to covary with. =A0An unstructured
> > covariance
> > > matrix would be an q x q matrix with structure
>
> > > =A0 =A0 =A0 =A0_
>
> > =A0 =A0 _
>
> > =A0 =A0| =A0 V11 =A0V12
> > V13 =A0... =A0V1q =A0|
>
> > =A0 =A0| =A0 V21 =A0V22
> > V23 =A0... =A0V2q =A0|
>
> > =A0 =A0| =A0 V31 =A0V32
> > V33 =A0... =A0V3q =A0|
> > > =A0 =A0 =A0 |
> > =A0 ... =A0 =A0 =A0 ...
> > ... =A0|
>
> > =A0 =A0| =A0 Vq1 =A0Vq2
> > Vq3 =A0... =A0Vqq =A0|
> > > =A0 =A0 =A0 =A0-
>
> > =A0 =A0 -
>
> > > Note that Vij=3DVji so the above matrix is
> > symmetric. =A0Note,
> > > too, that the variance matrix which you need to
> > construct
> > > can be specified as
>
> > > =A0 =A0 =A0 =A0_ =A0 =A0 =A0_
>
> > =A0 =A0| =A0 V11 =A0|
> > > =A0 =A0 =A0 =A0- =A0 =A0 =A0-
>
> > > That would qualify as an unstructured covariance
> > matrix. =A0But
> > > for a 1x1 matrix, we would not usually choose to
> > specify that
> > > the covariance matrix is unstructured. =A0Because
> > the covariance
> > > matrix is 1x1, you don't need to specify any
> > particular form
> > > for it. =A0Thus, you could write your random
> > statement as:
>
> > > =A0 random intercept / subject =3D
> > [participant] =A0solution;
>
> > > Now, we come to the REPEATED statement. =A0Your
> > REPEATED
> > > statement specification leaves much to be
> > desired. =A0First,
> > > just as you did for the RANDOM statement, you need to
> > > specify a subject. =A0Within a subject, the
> > residuals will be
> > > correlated. =A0Residuals for different subjects are
> > assumed
> > > to have no covariance. =A0In addition, you really
> > do want to
> > > specify the structure of the residual covariance
> > matrix.
> > > Do you think that proximate observations will have a
> > higher
> > > correlation than observations which are more distant
> > in
> > > time? =A0Then you might want to use one of the
> > spatial
> > > (SP(pow)(interval), SP(exp)(interval),
> > SP(gau)(interval),
> > > or some such) or an AR(1) covariance structure.
> > Whether
> > > you use a spatial covariance structure or an AR(1)
> > > covariance depends on whether the time between
> > measurements
> > > is the same for all measurements. =A0If you have a
> > uniform
> > > time between measurements, then the AR(1) covariance
> > > structure would be specified. =A0Otherwise, you
> > would use a
> > > spatial covariance structure. =A0As an alternative
> > to AR(1),
> > > you might also specify a Toeplitz covariance structure
> > for
> > > an experiment in which observations have a uniform
> > spacing
> > > over time.
>
> > > Note that as long as all subjects are measured at
> > common
> > > times (or with a common interval between measurements
> > on
> > > the same subject), then you could always specify an
> > > unstructured covariance matrix for the residual
> > covariance
> > > structure. =A0Assuming that your experiment does
> > record
> > > observations on a consistent time frame for all
> > subjects,
> > > then I would suggest that you start out by modeling
> > the
> > > residual covariance using an unstructured covariance
> > matrix.
> > > You can observe whether there is a general pattern to
> > the
> > > residual covariance which would follow an AR(1) or
> > Toeplitz
> > > structure. =A0If so, then re-estimate the model
> > with one of
> > > those structures. =A0You can form a likelihood
> > ratio test
> > > to determine whether the AR(1) or Toeplitz covariance
> > fits
> > > the observed data.
>
> > > Thus, assuming a consistent longitudinal frame for
> > all
> > > subjects, you would probably first want to use the
> > REPEATED
> > > statement:
>
> > > =A0 repeated [interval] / subject =3D
> > [participant]
>
> > =A0 =A0 =A0 =A0 =A0type =3D un;
>
> > > HTH,
>
> > > Dale
>
> > > ---------------------------------------
> > > Dale McLerran
> > > Fred Hutchinson Cancer Research Center
> > > mailto: dmclerra@NO_SPAMfhcrc.org
> > > Ph: =A0(206) 667-2926
> > > Fax: (206) 667-5977
> > > ---------------------------------------- Hide quoted
> > text -
>
> > > - Show quoted text -
>
> > Dale,
>
> > To make sure I'm following, you recommend that the OP
> > include both the
> > random intercept statement and the repeated statement? That
> > is, do you
> > recommend he include the following two lines of code?:
>
> > random intercept / subject =3D [participant] solution;
> > repeated [interval] / subject =3D [participant] type =3D un;
> > *assuming a
> > consistent longitudinal frame
>
> > Could the inclusion of both of these statements result in
> > an
> > overcorrection? I would consider only including the
> > repeated
> > statement, but I assume I'm missing something.
>
> > Ryan
>
> Ryan,
>
> Yes, I would advocate inclusion of both the RANDOM and REPEATED
> statements. =A0It is possible to have a person-specific intercept
> (which is accommodated by the RANDOM statement). =A0Conditional
> on the person-specific intercept, residuals which are proximate
> in time may tend to be positive/negative to a similar degree.
> Thus, even after inclusion of the RANDOM statement, there could
> be structure in the residuals which needs to be accounted for.
>
> Dale
>
> ---------------------------------------
> Dale McLerran
> Fred Hutchinson Cancer Research Center
> mailto: dmclerra@NO_SPAMfhcrc.org
> Ph: =A0(206) 667-2926
> Fax: (206) 667-5977
> ---------------------------------------- Hide quoted text -
>
> - Show quoted text -
Thanks, Dale. My logic was based on what I've learned from you and
others [and in my own work] that a RANDOM intercept statement can be,
at times, mathematically equivalent to a REPEATED statement with a
specified compound symmetric variance/covariance matrix in linear
mixed modeling. Assuming that the within-subject correlation of error
terms is roughly equal, then I figure these two statements (RANDOM and
REPEATED) could become redundant. I think you are suggesting that if,
for example, one observes that the correlation of any pair of repeated
measurements increases the closer the pair of repeated measurements is
in time (i.e. autoregressive type matrix), then both statements would
be important to include. Again, my thinking is that as the matrix
becomes more and more like a compound symmetric matrix, both
statements may not be necessary. If you have the time, please let me
know if my thinking is off here. Thanks for the clarification. -Ryan
|
|
0
|
|
|
|
Reply
|
Ryan
|
12/9/2009 9:07:45 PM
|
|
|
1 Replies
296 Views
(page loaded in 0.055 seconds)
Similiar Articles: Re: Help with panel data analysis - comp.soft-sys.sas--- On Wed, 12/9/09, Ryan wrote: > From: Ryan > Subject: Re: Help with panel data analysis > To: SAS-L@LISTSERV.UGA.EDU > Date: Wednesday, Dec... panel data regression analysis - comp.soft-sys.matlabRe: Help with panel data analysis - comp.soft-sys.sas panel data regression analysis - comp.soft-sys.matlab Re: Help with panel data analysis - comp.soft-sys.sas panel ... Re: fixed effect in Poisson regression of panel data - comp.soft ...Re: Help with panel data analysis - comp.soft-sys.sas fixed effect in Poisson regression of panel data - comp.soft-sys ... Re: Help with panel data analysis - comp.soft ... Re: Sample of a bivariate Probability Density Estimation data ...Re: Help with panel data analysis - comp.soft-sys.sas Re: Sample of a bivariate Probability Density Estimation data ... Re: Help with panel data analysis - comp.soft-sys ... Re: prior statement in PROC mixed #2 - comp.soft-sys.sas ...Re: FW: Summary of the differences of Base SAS 9.1.3 and SAS 9.2 ... Re: prior statement in PROC mixed #2 - comp.soft-sys.sas ... Re: Help with panel data analysis - comp ... Re: multilevel modeling - comp.soft-sys.sasRe: Help with panel data analysis - comp.soft-sys.sas > > > > > I believe I ... Multilevel modeling using PROC MIXED--regarding lsmean Hello: =20 I have run a proc mixed ... Re: FW: Summary of the differences of Base SAS 9.1.3 and SAS 9.2 ...Re: FW: Summary of the differences of Base SAS 9.1.3 and SAS 9.2 ... Re: prior statement in PROC mixed #2 - comp.soft-sys.sas ... Re: Help with panel data analysis - comp ... Re: URGENT - Mixed Models on Repeated Measurements - comp.soft-sys ...Re: Help with panel data analysis - comp.soft-sys.sas the same subjects, different conditions, repeated measurement ... Re: URGENT - Mixed Models on Repeated Measurements ... PROC MIXED, panel data and fixed effects - comp.soft-sys.sas ...Re: fixed effect in Poisson regression of panel data - comp.soft ... PROC MIXED, panel data and ... Re: Help with panel data analysis - comp.soft-sys.sas PROC MIXED, panel ... Peak Analysis in the Radon Transform - comp.soft-sys.matlab ...help : Analyzing MRI raw data - comp.dsp Therefor you need the inverse Radon transform. Do a > google search on radon transform. ... Re: Help with panel data analysis ... Re: Help with panel data analysis - comp.soft-sys.sas | Computer Group--- On Wed, 12/9/09, Ryan wrote: > From: Ryan > Subject: Re: Help with panel data analysis > To: SAS-L@LISTSERV.UGA.EDU > Date: Wednesday, Dec... RE: st: 3 Problems in Panel Data AnalysisFardad et al., A small addendum to what Nils and Martin have said, specifically regarding the Hausman test of fixed vs. random effects: the standard form of this test ... 7/29/2012 10:47:55 AM
|