match groups?

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

match groups?

Hoover, Matthew
Hello SPSS/ PASW (or whatever the name is) experts!
 
Perhaps there is already a function to do this and I just can't find it.  Say for example that you have a dataset composed of individuals.  Lets say each line is a student.  For each student, you have a range of demographic variables such as age, gender, race, free or reduced lunch status, LEP status, etc. etc.  Lets also say that you have a code that categorizes each student according to which comparison group they belong to (ie, either an intervention program or not).  Lets further say that you would like to select a subsample of this large dataset in which you want to include students who are in each group (comparison or not comparison) who have similar demographic characteristics.
 
The only way that I know how to do this is pretty unscientific and it is by sorting by the groups and hand selecting cases that are close in terms of the demographic factors of interest.
 
It seems to me that there should be a case selection function where you can specify a group variable and specify which variables you would like to best "match".  Is there such a function?  Does what I'm saying make sense? 
 
Thank you!
 
Matt
Reply | Threaded
Open this post in threaded view
|

Mixed model within subjects

Garry Gelade

Dear SPSS-ers

 

I’m interested in testing whether CHANGES in performance in a bunch of subjects are associated with CHANGES in heartrate. (I’m not interested in the between subjects effect of heartrate on performance, which I want to eliminate).  Observations are taken daily.  There is quite a bot of missing data so I guess that means use MIXED.

 

The spec I am thinking of is:

 

MIXED performance  with heartrate

  /FIXED= heatrrate  | SSTYPE(3)   /METHOD=REML  

  /RANDOM=INTERCEPT | SUBJECT(Name) COVTYPE(VC)

/REPEATED=date | SUBJECT(Name) COVTYPE(DIAG).

 

My question is whether I need both the RANDOM INTERCEPT and the REPEATED statements to assess pure within subjects changes? Or can I just use one of them?

 

Any thoughts/explanation/better ideas would be most appreciated.

 

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: match groups?

Jon K Peck
In reply to this post by Hoover, Matthew
On first reading, I thought that you wanted to do a case-control sort of match.  That is, a match where you have a set of subjects in the experiment/treatment group, and you want to associate each with as close a match on a set of characteristics from the control group.  That can be done with the FUZZY extension command available from the SPSS Community website (www.ibm.com/developerworks/spssdevcentral).

But on a second reading, I'm not so sure.  If the case-control scenario is wrong, please explain further what you are trying to do.

Regards,

Jon Peck
Senior Software Engineer, IBM
[hidden email]
312-651-3435




From:        "Hoover, Matthew" <[hidden email]>
To:        [hidden email]
Date:        01/25/2011 04:09 PM
Subject:        [SPSSX-L] match groups?
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hello SPSS/ PASW (or whatever the name is) experts!
 
Perhaps there is already a function to do this and I just can't find it.  Say for example that you have a dataset composed of individuals.  Lets say each line is a student.  For each student, you have a range of demographic variables such as age, gender, race, free or reduced lunch status, LEP status, etc. etc.  Lets also say that you have a code that categorizes each student according to which comparison group they belong to (ie, either an intervention program or not).  Lets further say that you would like to select a subsample of this large dataset in which you want to include students who are in each group (comparison or not comparison) who have similar demographic characteristics.
 
The only way that I know how to do this is pretty unscientific and it is by sorting by the groups and hand selecting cases that are close in terms of the demographic factors of interest.
 
It seems to me that there should be a case selection function where you can specify a group variable and specify which variables you would like to best "match".  Is there such a function?  Does what I'm saying make sense?  
 
Thank you!
 
Matt
Reply | Threaded
Open this post in threaded view
|

Re: match groups?

Hoover, Matthew
Yes, this is pretty much what I'd like to do.  I want to take a sample of a large dataset that would include two groups (an experimental and a control group) that are roughly similar on demographic variables.  So basically I'd like to tell SPSS which groups to "sample" from and which set of factors to roughly equate. 
 
I'll take a look at that link.  Thanks :)
 
Matt
 

From: Jon K Peck [[hidden email]]
Sent: Tuesday, January 25, 2011 8:07 PM
To: Hoover, Matthew
Cc: [hidden email]
Subject: Re: [SPSSX-L] match groups?

On first reading, I thought that you wanted to do a case-control sort of match.  That is, a match where you have a set of subjects in the experiment/treatment group, and you want to associate each with as close a match on a set of characteristics from the control group.  That can be done with the FUZZY extension command available from the SPSS Community website (www.ibm.com/developerworks/spssdevcentral).

But on a second reading, I'm not so sure.  If the case-control scenario is wrong, please explain further what you are trying to do.

Regards,

Jon Peck
Senior Software Engineer, IBM
[hidden email]
312-651-3435




From:        "Hoover, Matthew" <[hidden email]>
To:        [hidden email]
Date:        01/25/2011 04:09 PM
Subject:        [SPSSX-L] match groups?
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hello SPSS/ PASW (or whatever the name is) experts!
 
Perhaps there is already a function to do this and I just can't find it.  Say for example that you have a dataset composed of individuals.  Lets say each line is a student.  For each student, you have a range of demographic variables such as age, gender, race, free or reduced lunch status, LEP status, etc. etc.  Lets also say that you have a code that categorizes each student according to which comparison group they belong to (ie, either an intervention program or not).  Lets further say that you would like to select a subsample of this large dataset in which you want to include students who are in each group (comparison or not comparison) who have similar demographic characteristics.
 
The only way that I know how to do this is pretty unscientific and it is by sorting by the groups and hand selecting cases that are close in terms of the demographic factors of interest.
 
It seems to me that there should be a case selection function where you can specify a group variable and specify which variables you would like to best "match".  Is there such a function?  Does what I'm saying make sense?  
 
Thank you!
 
Matt
Reply | Threaded
Open this post in threaded view
|

Re: match groups?

Art Kendall
In reply to this post by Hoover, Matthew
Why do you want to subsample? Are you going to gather new data on those students? If not why, not use all of the existing data?

Exactly how to sample may/or may not depend on what you are going to do.

Art Kendall
Social Research Consultants



On 1/25/2011 5:57 PM, Hoover, Matthew wrote:
Hello SPSS/ PASW (or whatever the name is) experts!
 
Perhaps there is already a function to do this and I just can't find it.  Say for example that you have a dataset composed of individuals.  Lets say each line is a student.  For each student, you have a range of demographic variables such as age, gender, race, free or reduced lunch status, LEP status, etc. etc.  Lets also say that you have a code that categorizes each student according to which comparison group they belong to (ie, either an intervention program or not).  Lets further say that you would like to select a subsample of this large dataset in which you want to include students who are in each group (comparison or not comparison) who have similar demographic characteristics.
 
The only way that I know how to do this is pretty unscientific and it is by sorting by the groups and hand selecting cases that are close in terms of the demographic factors of interest.
 
It seems to me that there should be a case selection function where you can specify a group variable and specify which variables you would like to best "match".  Is there such a function?  Does what I'm saying make sense? 
 
Thank you!
 
Matt
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: match groups?

Maguin, Eugene
In reply to this post by Hoover, Matthew
Jon has already suggested a procedure to use. It seems to me that another
alternative might be propensity score matching. Functionally, I think it
would be more work, quite a bit more, perhaps, to implement than the
procedure Jon recommended because I'm not aware of an inclusive command for
propensity scoring such as stata has.

For my own learning, Jon, would you be willing compare and contrast the
fuzzy command with propensity scoring? I'd be interested to learn the
similarities and differences and, in particular, whether fuzzy could
function as a substitute for propensity scoring.

Thanks, Gene Maguin

________________________________

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Hoover, Matthew
Sent: Tuesday, January 25, 2011 5:57 PM
To: [hidden email]
Subject: match groups?


Hello SPSS/ PASW (or whatever the name is) experts!

Perhaps there is already a function to do this and I just can't find it.
Say for example that you have a dataset composed of individuals.  Lets say
each line is a student.  For each student, you have a range of demographic
variables such as age, gender, race, free or reduced lunch status, LEP
status, etc. etc.  Lets also say that you have a code that categorizes each
student according to which comparison group they belong to (ie, either an
intervention program or not).  Lets further say that you would like to
select a subsample of this large dataset in which you want to include
students who are in each group (comparison or not comparison) who have
similar demographic characteristics.

The only way that I know how to do this is pretty unscientific and it is by
sorting by the groups and hand selecting cases that are close in terms of
the demographic factors of interest.

It seems to me that there should be a case selection function where you can
specify a group variable and specify which variables you would like to best
"match".  Is there such a function?  Does what I'm saying make sense?

Thank you!

Matt

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: match groups?

Bruce Weaver
Administrator
You may find something useful here:

   http://spsstools.net/SampleSyntax.htm#RandomSampling


Gene Maguin wrote
Jon has already suggested a procedure to use. It seems to me that another
alternative might be propensity score matching. Functionally, I think it
would be more work, quite a bit more, perhaps, to implement than the
procedure Jon recommended because I'm not aware of an inclusive command for
propensity scoring such as stata has.

For my own learning, Jon, would you be willing compare and contrast the
fuzzy command with propensity scoring? I'd be interested to learn the
similarities and differences and, in particular, whether fuzzy could
function as a substitute for propensity scoring.

Thanks, Gene Maguin

________________________________

From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Hoover, Matthew
Sent: Tuesday, January 25, 2011 5:57 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: match groups?


Hello SPSS/ PASW (or whatever the name is) experts!

Perhaps there is already a function to do this and I just can't find it.
Say for example that you have a dataset composed of individuals.  Lets say
each line is a student.  For each student, you have a range of demographic
variables such as age, gender, race, free or reduced lunch status, LEP
status, etc. etc.  Lets also say that you have a code that categorizes each
student according to which comparison group they belong to (ie, either an
intervention program or not).  Lets further say that you would like to
select a subsample of this large dataset in which you want to include
students who are in each group (comparison or not comparison) who have
similar demographic characteristics.

The only way that I know how to do this is pretty unscientific and it is by
sorting by the groups and hand selecting cases that are close in terms of
the demographic factors of interest.

It seems to me that there should be a case selection function where you can
specify a group variable and specify which variables you would like to best
"match".  Is there such a function?  Does what I'm saying make sense?

Thank you!

Matt

=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: match groups?

J P-6
In reply to this post by Maguin, Eugene
Hello,
 
As for the difference between propensity matching and fuzzy matching. I have used fuzzy matching when the same individuals are in two seperate data files. and want to merge those files into one. There was no ID variable to match on and because data for both files were manually keyed there were misspellings of names / data entry errors in both files. The SAS program I used had a series of  soundex-like functions to match names and other similiar functions for demographic variables.
 
Propensity score matching is used to identify two _different_ individuals who are similiar on a range of  variables (have very similiar propensity scores). I suppose you could use it to match the same individual in two different files (although I wouldn't recommend it) but it  is designed exactly for the situation you describe.
 
I'm in the process of revising, documenting, and testing a propensity score matching macro I wrote several years ago. Let me know if you would like a copy.
 
HTH,
 
John   


From: Gene Maguin <[hidden email]>
To: [hidden email]
Sent: Wed, January 26, 2011 8:58:59 AM
Subject: Re: match groups?

Jon has already suggested a procedure to use. It seems to me that another
alternative might be propensity score matching. Functionally, I think it
would be more work, quite a bit more, perhaps, to implement than the
procedure Jon recommended because I'm not aware of an inclusive command for
propensity scoring such as stata has.

For my own learning, Jon, would you be willing compare and contrast the
fuzzy command with propensity scoring? I'd be interested to learn the
similarities and differences and, in particular, whether fuzzy could
function as a substitute for propensity scoring.

Thanks, Gene Maguin

________________________________

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Hoover, Matthew
Sent: Tuesday, January 25, 2011 5:57 PM
To: [hidden email]
Subject: match groups?


Hello SPSS/ PASW (or whatever the name is) experts!

Perhaps there is already a function to do this and I just can't find it.
Say for example that you have a dataset composed of individuals.  Lets say
each line is a student.  For each student, you have a range of demographic
variables such as age, gender, race, free or reduced lunch status, LEP
status, etc. etc.  Lets also say that you have a code that categorizes each
student according to which comparison group they belong to (ie, either an
intervention program or not).  Lets further say that you would like to
select a subsample of this large dataset in which you want to include
students who are in each group (comparison or not comparison) who have
similar demographic characteristics.

The only way that I know how to do this is pretty unscientific and it is by
sorting by the groups and hand selecting cases that are close in terms of
the demographic factors of interest.

It seems to me that there should be a case selection function where you can
specify a group variable and specify which variables you would like to best
"match".  Is there such a function?  Does what I'm saying make sense?

Thank you!

Matt

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

Reply | Threaded
Open this post in threaded view
|

Re: Mixed model within subjects

Ryan
In reply to this post by Garry Gelade
The variable, heartrate, is known as a time-varying covariate. If you
want to explicitly partition the within-subject effect from the
between-subject effect, you'll need to parameterize the model a bit
differently. Structure your dataset as follows:

ID   DAY   X     Y
1      1      63   23
1      2      65   33
1      4      80   10
2      1      69   11
2      2      78   19
2      3      .      .
2      4      .      .
3      1      .      .
3      3
3      4
.
.
.

Then construct two new variables: (1) Mean value of X and (2)
Deviation of each X value from the mean value of X. A simple way to do
this is to use AGGREGATE and COMPUTE:

AGGREGATE
  /OUTFILE=*
  MODE=ADDVARIABLES
  /BREAK=ID
  /X_MEAN = MEAN(X).

COMPUTE X_DEVIATION = X - X_MEAN.

Then you can write the MIXED code as follows:

MIXED Y WITH DAY X_MEAN X_DEVIATION
 /FIXED = DAY X_MEAN X_DEVIATION
 /METHOD = REML
 /PRINT = SOLUTION
 /RANDOM INTERCEPT TIME  | SUBJECT(ID) COVTYPE(UN) .

The fixed effect for X_DEVIATION reflects within-subject change, while
the fixed effect for X_MEAN reflects the between-subject effect.

It is possible to construct a likelihood ratio test to determine
whether you can assume that the between-subject effect is the same as
the within-subject effect. That is, you can empirically test whether
it would be appropriate to replace X_MEAN and X_DEVIATION with the
original variable X. (The MIXED code presented above assumes there is
no interaction between time and the covariate. This assumption may be
incorrect.)

Further details regarding this approach can be found here:

http://www.uic.edu/classes/bstt/bstt513/Kaplan%20Chapter%2012.pdf

HTH.

Ryan

On Tue, Jan 25, 2011 at 6:50 PM, Garry Gelade
<[hidden email]> wrote:

> Dear SPSS-ers
>
>
>
> I’m interested in testing whether CHANGES in performance in a bunch of
> subjects are associated with CHANGES in heartrate. (I’m not interested in
> the between subjects effect of heartrate on performance, which I want to
> eliminate).  Observations are taken daily.  There is quite a bot of missing
> data so I guess that means use MIXED.
>
>
>
> The spec I am thinking of is:
>
>
>
> MIXED performance  with heartrate
>
>   /FIXED= heatrrate  | SSTYPE(3)   /METHOD=REML
>
>   /RANDOM=INTERCEPT | SUBJECT(Name) COVTYPE(VC)
>
> /REPEATED=date | SUBJECT(Name) COVTYPE(DIAG).
>
>
>
> My question is whether I need both the RANDOM INTERCEPT and the REPEATED
> statements to assess pure within subjects changes? Or can I just use one of
> them?
>
>
>
> Any thoughts/explanation/better ideas would be most appreciated.
>
>
>
> Thanks.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Mixed model within subjects

Ryan
Minor correction to the MIXED code I just posted. Replace "TIME" with
"DAY" on the RANDOM statement.

Ryan

On Wed, Jan 26, 2011 at 7:52 PM, R B <[hidden email]> wrote:

> The variable, heartrate, is known as a time-varying covariate. If you
> want to explicitly partition the within-subject effect from the
> between-subject effect, you'll need to parameterize the model a bit
> differently. Structure your dataset as follows:
>
> ID   DAY   X     Y
> 1      1      63   23
> 1      2      65   33
> 1      4      80   10
> 2      1      69   11
> 2      2      78   19
> 2      3      .      .
> 2      4      .      .
> 3      1      .      .
> 3      3
> 3      4
> .
> .
> .
>
> Then construct two new variables: (1) Mean value of X and (2)
> Deviation of each X value from the mean value of X. A simple way to do
> this is to use AGGREGATE and COMPUTE:
>
> AGGREGATE
>  /OUTFILE=*
>  MODE=ADDVARIABLES
>  /BREAK=ID
>  /X_MEAN = MEAN(X).
>
> COMPUTE X_DEVIATION = X - X_MEAN.
>
> Then you can write the MIXED code as follows:
>
> MIXED Y WITH DAY X_MEAN X_DEVIATION
>  /FIXED = DAY X_MEAN X_DEVIATION
>  /METHOD = REML
>  /PRINT = SOLUTION
>  /RANDOM INTERCEPT TIME  | SUBJECT(ID) COVTYPE(UN) .
>
> The fixed effect for X_DEVIATION reflects within-subject change, while
> the fixed effect for X_MEAN reflects the between-subject effect.
>
> It is possible to construct a likelihood ratio test to determine
> whether you can assume that the between-subject effect is the same as
> the within-subject effect. That is, you can empirically test whether
> it would be appropriate to replace X_MEAN and X_DEVIATION with the
> original variable X. (The MIXED code presented above assumes there is
> no interaction between time and the covariate. This assumption may be
> incorrect.)
>
> Further details regarding this approach can be found here:
>
> http://www.uic.edu/classes/bstt/bstt513/Kaplan%20Chapter%2012.pdf
>
> HTH.
>
> Ryan
>
> On Tue, Jan 25, 2011 at 6:50 PM, Garry Gelade
> <[hidden email]> wrote:
>> Dear SPSS-ers
>>
>>
>>
>> I’m interested in testing whether CHANGES in performance in a bunch of
>> subjects are associated with CHANGES in heartrate. (I’m not interested in
>> the between subjects effect of heartrate on performance, which I want to
>> eliminate).  Observations are taken daily.  There is quite a bot of missing
>> data so I guess that means use MIXED.
>>
>>
>>
>> The spec I am thinking of is:
>>
>>
>>
>> MIXED performance  with heartrate
>>
>>   /FIXED= heatrrate  | SSTYPE(3)   /METHOD=REML
>>
>>   /RANDOM=INTERCEPT | SUBJECT(Name) COVTYPE(VC)
>>
>> /REPEATED=date | SUBJECT(Name) COVTYPE(DIAG).
>>
>>
>>
>> My question is whether I need both the RANDOM INTERCEPT and the REPEATED
>> statements to assess pure within subjects changes? Or can I just use one of
>> them?
>>
>>
>>
>> Any thoughts/explanation/better ideas would be most appreciated.
>>
>>
>>
>> Thanks.
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Mixed model within subjects

Garry Gelade
Dear Ryan

Many thanks for this. It's really really neat.

I've added a /REPEATED day |SUBJECT (ID) COVTYPE(AR1) clause as well. I
don't know if you think its a good idea in oprinciple, but it seems to
improve the fit somewhat.

Kind Regards

Garry

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of R B
Sent: 27 January 2011 00:57
To: [hidden email]
Subject: Re: Mixed model within subjects

Minor correction to the MIXED code I just posted. Replace "TIME" with
"DAY" on the RANDOM statement.

Ryan

On Wed, Jan 26, 2011 at 7:52 PM, R B <[hidden email]> wrote:

> The variable, heartrate, is known as a time-varying covariate. If you
> want to explicitly partition the within-subject effect from the
> between-subject effect, you'll need to parameterize the model a bit
> differently. Structure your dataset as follows:
>
> ID   DAY   X     Y
> 1      1      63   23
> 1      2      65   33
> 1      4      80   10
> 2      1      69   11
> 2      2      78   19
> 2      3      .      .
> 2      4      .      .
> 3      1      .      .
> 3      3
> 3      4
> .
> .
> .
>
> Then construct two new variables: (1) Mean value of X and (2)
> Deviation of each X value from the mean value of X. A simple way to do
> this is to use AGGREGATE and COMPUTE:
>
> AGGREGATE
>  /OUTFILE=*
>  MODE=ADDVARIABLES
>  /BREAK=ID
>  /X_MEAN = MEAN(X).
>
> COMPUTE X_DEVIATION = X - X_MEAN.
>
> Then you can write the MIXED code as follows:
>
> MIXED Y WITH DAY X_MEAN X_DEVIATION
>  /FIXED = DAY X_MEAN X_DEVIATION
>  /METHOD = REML
>  /PRINT = SOLUTION
>  /RANDOM INTERCEPT TIME  | SUBJECT(ID) COVTYPE(UN) .
>
> The fixed effect for X_DEVIATION reflects within-subject change, while
> the fixed effect for X_MEAN reflects the between-subject effect.
>
> It is possible to construct a likelihood ratio test to determine
> whether you can assume that the between-subject effect is the same as
> the within-subject effect. That is, you can empirically test whether
> it would be appropriate to replace X_MEAN and X_DEVIATION with the
> original variable X. (The MIXED code presented above assumes there is
> no interaction between time and the covariate. This assumption may be
> incorrect.)
>
> Further details regarding this approach can be found here:
>
> http://www.uic.edu/classes/bstt/bstt513/Kaplan%20Chapter%2012.pdf
>
> HTH.
>
> Ryan
>
> On Tue, Jan 25, 2011 at 6:50 PM, Garry Gelade
> <[hidden email]> wrote:
>> Dear SPSS-ers
>>
>>
>>
>> I'm interested in testing whether CHANGES in performance in a bunch of
>> subjects are associated with CHANGES in heartrate. (I'm not interested in
>> the between subjects effect of heartrate on performance, which I want to
>> eliminate).  Observations are taken daily.  There is quite a bot of
missing

>> data so I guess that means use MIXED.
>>
>>
>>
>> The spec I am thinking of is:
>>
>>
>>
>> MIXED performance  with heartrate
>>
>>   /FIXED= heatrrate  | SSTYPE(3)   /METHOD=REML
>>
>>   /RANDOM=INTERCEPT | SUBJECT(Name) COVTYPE(VC)
>>
>> /REPEATED=date | SUBJECT(Name) COVTYPE(DIAG).
>>
>>
>>
>> My question is whether I need both the RANDOM INTERCEPT and the REPEATED
>> statements to assess pure within subjects changes? Or can I just use one
of

>> them?
>>
>>
>>
>> Any thoughts/explanation/better ideas would be most appreciated.
>>
>>
>>
>> Thanks.
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Mixed model within subjects

Ryan
Hi, Garry:

I think it is possible to have serial correlation conditional upon the
random effects. I do not see anything inherently wrong with adding a
REPEATED statement with an autoregressive residual covariance
structure specification.

Back to my original response for a moment...When I suggested you
compute the mean and deviation scores, I was referring to subject
specific means and deviations. You will see in the code I posted for
the AGGREGATE function that I included ID as the BREAK variable. I'm
guessing you figured this out by looking at the code, but thought I'd
make this point just in case it did not come across the first time
around.

Ryan

On Thu, Jan 27, 2011 at 1:20 PM, Garry Gelade
<[hidden email]> wrote:

> Dear Ryan
>
> Many thanks for this. It's really really neat.
>
> I've added a /REPEATED day |SUBJECT (ID) COVTYPE(AR1) clause as well. I
> don't know if you think its a good idea in oprinciple, but it seems to
> improve the fit somewhat.
>
> Kind Regards
>
> Garry
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of R B
> Sent: 27 January 2011 00:57
> To: [hidden email]
> Subject: Re: Mixed model within subjects
>
> Minor correction to the MIXED code I just posted. Replace "TIME" with
> "DAY" on the RANDOM statement.
>
> Ryan
>
> On Wed, Jan 26, 2011 at 7:52 PM, R B <[hidden email]> wrote:
>> The variable, heartrate, is known as a time-varying covariate. If you
>> want to explicitly partition the within-subject effect from the
>> between-subject effect, you'll need to parameterize the model a bit
>> differently. Structure your dataset as follows:
>>
>> ID   DAY   X     Y
>> 1      1      63   23
>> 1      2      65   33
>> 1      4      80   10
>> 2      1      69   11
>> 2      2      78   19
>> 2      3      .      .
>> 2      4      .      .
>> 3      1      .      .
>> 3      3
>> 3      4
>> .
>> .
>> .
>>
>> Then construct two new variables: (1) Mean value of X and (2)
>> Deviation of each X value from the mean value of X. A simple way to do
>> this is to use AGGREGATE and COMPUTE:
>>
>> AGGREGATE
>>  /OUTFILE=*
>>  MODE=ADDVARIABLES
>>  /BREAK=ID
>>  /X_MEAN = MEAN(X).
>>
>> COMPUTE X_DEVIATION = X - X_MEAN.
>>
>> Then you can write the MIXED code as follows:
>>
>> MIXED Y WITH DAY X_MEAN X_DEVIATION
>>  /FIXED = DAY X_MEAN X_DEVIATION
>>  /METHOD = REML
>>  /PRINT = SOLUTION
>>  /RANDOM INTERCEPT TIME  | SUBJECT(ID) COVTYPE(UN) .
>>
>> The fixed effect for X_DEVIATION reflects within-subject change, while
>> the fixed effect for X_MEAN reflects the between-subject effect.
>>
>> It is possible to construct a likelihood ratio test to determine
>> whether you can assume that the between-subject effect is the same as
>> the within-subject effect. That is, you can empirically test whether
>> it would be appropriate to replace X_MEAN and X_DEVIATION with the
>> original variable X. (The MIXED code presented above assumes there is
>> no interaction between time and the covariate. This assumption may be
>> incorrect.)
>>
>> Further details regarding this approach can be found here:
>>
>> http://www.uic.edu/classes/bstt/bstt513/Kaplan%20Chapter%2012.pdf
>>
>> HTH.
>>
>> Ryan
>>
>> On Tue, Jan 25, 2011 at 6:50 PM, Garry Gelade
>> <[hidden email]> wrote:
>>> Dear SPSS-ers
>>>
>>>
>>>
>>> I'm interested in testing whether CHANGES in performance in a bunch of
>>> subjects are associated with CHANGES in heartrate. (I'm not interested in
>>> the between subjects effect of heartrate on performance, which I want to
>>> eliminate).  Observations are taken daily.  There is quite a bot of
> missing
>>> data so I guess that means use MIXED.
>>>
>>>
>>>
>>> The spec I am thinking of is:
>>>
>>>
>>>
>>> MIXED performance  with heartrate
>>>
>>>   /FIXED= heatrrate  | SSTYPE(3)   /METHOD=REML
>>>
>>>   /RANDOM=INTERCEPT | SUBJECT(Name) COVTYPE(VC)
>>>
>>> /REPEATED=date | SUBJECT(Name) COVTYPE(DIAG).
>>>
>>>
>>>
>>> My question is whether I need both the RANDOM INTERCEPT and the REPEATED
>>> statements to assess pure within subjects changes? Or can I just use one
> of
>>> them?
>>>
>>>
>>>
>>> Any thoughts/explanation/better ideas would be most appreciated.
>>>
>>>
>>>
>>> Thanks.
>>
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Textbook request

Maguin, Eugene
In reply to this post by Ryan
I'm would like suggestions for textbooks (or references) that have worked
examples of maximum likelihood estimation. Ideally, for simple continuous
and categorical variable models. Don't worry too much about difficulty, I'll
sort that out myself.

It feels really strange to ask for this but the works 'maximum likelihood'
were never uttered in stats sequence in my psychology PhD program. Least
squares actually were never mentioned either but that's a simple calculus
problem.

So, suggestions please.

Thanks, Gene Maguin

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Automatic reply: Textbook request

Lee, Jason (Customer Insights Group)
I am out of the office through friday Feb 4th. I will be checking email and will respond as soon as I am able. If you need urgent assistance please contact Barbara Bilodeau.

Thank you,
Jason
__________________NOTICE_______________ This electronic mail transmission, including any attachments, contains confidential information of Bain & Company, Inc. ("Bain") and/or its clients. It is intended only for the person(s) named, and the information in such e-mail shall only be used by the person(s) named for the purpose intended and for no other purpose. Any use, distribution, copying, or disclosure by any other persons, or by the person(s) named but for purposes other than the intended purpose, is strictly prohibited. If you received this transmission in error, please notify the sender by reply e-mail and then destroy this e-mail. Opinions, conclusions and other information in this message that do not relate to the official business of Bain shall be understood to be neither given nor endorsed by Bain. When addressed to Bain clients, any information contained in this e-mail shall be subject to the terms and conditions in the applicable client contract.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Automatic reply: Textbook request

MaxJasper
Comparing Models with a Likelihood-Ratio Test

SPSS [version>=15] Advanced Stat Procedures Companion

Marija J Norusis
Reply | Threaded
Open this post in threaded view
|

Re: Textbook request

John F Hall
In reply to this post by Maguin, Eugene
Gene
 
Way over my non-statistical head, but Andy Field's book  Discovering Statistics Using SPSS (2nd edition, Sage, 2005) on my page of textbooks http://surveyresearch.weebly.com/spss-textbooks.html has M L Estimation on pp 221, 684 and 737 and M L Factor analysis on pp 629 and 634.
 
Copied to Andy himself and to some colleagues from way back when (1970s) who may be able to help.
 
----- Original Message -----
Sent: Friday, January 28, 2011 8:40 PM
Subject: Textbook request

I'm would like suggestions for textbooks (or references) that have worked
examples of maximum likelihood estimation. Ideally, for simple continuous
and categorical variable models. Don't worry too much about difficulty, I'll
sort that out myself.

It feels really strange to ask for this but the works 'maximum likelihood'
were never uttered in stats sequence in my psychology PhD program. Least
squares actually were never mentioned either but that's a simple calculus
problem.

So, suggestions please.

Thanks, Gene Maguin

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Textbook request

Bruce Weaver
Administrator
In reply to this post by Maguin, Eugene
Hi Gene.  Here is an introductory "mini-lecture" on MLE you might find useful.

   http://socserv.socsci.mcmaster.ca/jfox/Courses/SPIDA/mle-mini-lecture-notes.pdf

HTH.

Cheers,
Bruce


Gene Maguin wrote
I'm would like suggestions for textbooks (or references) that have worked
examples of maximum likelihood estimation. Ideally, for simple continuous
and categorical variable models. Don't worry too much about difficulty, I'll
sort that out myself.

It feels really strange to ask for this but the works 'maximum likelihood'
were never uttered in stats sequence in my psychology PhD program. Least
squares actually were never mentioned either but that's a simple calculus
problem.

So, suggestions please.

Thanks, Gene Maguin

=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).