1:1 Matched case-control study using GENLIN (and not succeeding)

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

1:1 Matched case-control study using GENLIN (and not succeeding)

Marta Garcia-Granero
Hi everybody:

I need some help trying to get the correct OR for a 1:1 matched
case-control study:

* Sample dataset (from Campell's "Statistics at Square Two") 1:1 matched
case-control study *.
DATA LIST FREE/PairNumber CaseControl Monitoring (3 F8).
BEGIN DATA
 1 1 1  1 0 1  2 1 1  2 0 1  3 1 1  3 0 1  4 1 1  4 0 1  5 1 1  5 0 1
 6 1 1  6 0 1  7 1 1  7 0 1  8 1 1  8 0 1  9 1 1  9 0 1 10 1 1 10 0 1
11 1 1 11 0 0 12 1 1 12 0 0 13 1 1 13 0 0 14 1 1 14 0 0 15 1 1 15 0 0
16 1 1 16 0 0 17 1 1 17 0 0 18 1 1 18 0 0 19 1 1 19 0 0 20 1 1 20 0 0
21 1 1 21 0 0 22 1 1 22 0 0 23 1 1 23 0 0 24 1 0 24 0 1 25 1 0 25 0 1
26 1 0 26 0 1 27 1 0 27 0 0 28 1 0 28 0 0 29 1 0 29 0 0 30 1 0 30 0 0
31 1 0 31 0 0 32 1 0 32 0 0 33 1 0 33 0 0 34 1 0 34 0 0 35 1 0 35 0 0
END DATA.
VALUE LABELS CaseControl 0 'Survivor (Control)' 1 'Death (Case)'
/Monitoring 0 'Adequate' 1 'Inadequate'.

* Goal (from Campbell's book and hand calculations): OR=4.333 (95%CI:
1.235 to 15.206) *.

* Using stratified analysis (Mantel-Haenszel estimator of OR): Correct *.
CROSSTABS
  /TABLES=Monitoring BY CaseControl BY PairNumber
  /FORMAT=NOTABLES
  /STATISTICS=CMH(1).

* Using COXREG (with a false time variable called "S": Correct *.
COMPUTE S=(CaseControl=0)+1.
COXREG S
  /STATUS=CaseControl(1)
  /STRATA=PairNumber
  /CONTRAST (Monitoring)=Indicator(1)
  /METHOD=ENTER Monitoring
  /PRINT=CI(95).

* Using GENLIN: NOT Correct *.
GENLIN CaseControl (REFERENCE=FIRST) BY Monitoring (ORDER=DESCENDING)
  /MODEL Monitoring INTERCEPT=YES
   DISTRIBUTION=BINOMIAL LINK=LOGIT
  /CRITERIA METHOD=FISHER SCALE=1 ANALYSISTYPE=3(LR) CILEVEL=95
LIKELIHOOD=FULL
  /REPEATED SUBJECT=PairNumber SORT=YES CORRTYPE=INDEPENDENT
ADJUSTCORR=YES COVB=ROBUST
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

Why is my GENLIN syntax not correct ?

Thanks in advance

Marta GG

--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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: 1:1 Matched case-control study using GENLIN (and not succeeding)

Marta Garcia-Granero
MaxJasper wrote:
> You cannot use 0 for case or for control.
> Control# > Case# >0
>
> So, use:
> Control=2
> Case=1
>

Thanks Max, but I'm NOT getting an error message, just a wrong estimate.
I followed your indication, but this is not working either:

* Avoiding 0 (I tried recoding only CaseControl, and then Monitoring
too, but same result) *.
COMPUTE CaseControl=CaseControl+1.
COMPUTE Monitoring=Monitoring+1.
VALUE LABELS CaseControl 1 'Survivor (Control)' 2 'Death (Case)'
/Monitoring 1 'Adequate' 2 'Inadequate'.

GENLIN CaseControl (REFERENCE=FIRST) BY Monitoring (ORDER=DESCENDING)
 /MODEL Monitoring INTERCEPT=YES
  DISTRIBUTION=BINOMIAL LINK=LOGIT
 /CRITERIA METHOD=FISHER SCALE=1 ANALYSISTYPE=3(LR) CILEVEL=95
LIKELIHOOD=FULL
 /REPEATED SUBJECT=PairNumber SORT=YES CORRTYPE=INDEPENDENT
ADJUSTCORR=YES COVB=ROBUST
 /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

Still puzzled.

Marta GG


--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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: 1:1 Matched case-control study using GENLIN (and not succeeding)

Ryan
Marta,

Here's what I'm assuming for the generalized estimating equation you are attempting to construct:

(1) dependent variable = CaseControl
(2) between-subjects (categorical) independent variable = Monitoring
(3) subject ID variable = PairNumber
(4) within-subjects variable = S (the level of this variable repeats within subjects)

If I'm correct so far, then one potentially proper parameterization would be coded as follows:

* Generalized Estimating Equations.
GENLIN CaseControl (REFERENCE=FIRST) BY Monitoring (ORDER=DESCENDING)
  /MODEL Monitoring INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /CRITERIA METHOD=FISHER(1) SCALE=1 MAXITERATIONS=100 MAXSTEPHALVING=5 PCONVERGE=1E-006(ABSOLUTE)
    SINGULAR=1E-012 ANALYSISTYPE=3(WALD) CILEVEL=95 LIKELIHOOD=FULL
  /REPEATED SUBJECT=PairNumber WITHINSUBJECT=S SORT=YES CORRTYPE=EXCHANGEABLE ADJUSTCORR=YES
    COVB=ROBUST MAXITERATIONS=100 PCONVERGE=1e-006(ABSOLUTE) UPDATECORR=1
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

Note that I have allowed for a non-zero covariance by specifying the "EXCHANGEABLE" var-cov residual matrix.

This is not what I'd consider to be the full model, but I do think this parameterization captures what you're after. Feel free to write back if I'm off base here.

HTH,

Ryan
García-Granero wrote
MaxJasper wrote:
> You cannot use 0 for case or for control.
> Control# > Case# >0
>
> So, use:
> Control=2
> Case=1
>

Thanks Max, but I'm NOT getting an error message, just a wrong estimate.
I followed your indication, but this is not working either:

* Avoiding 0 (I tried recoding only CaseControl, and then Monitoring
too, but same result) *.
COMPUTE CaseControl=CaseControl+1.
COMPUTE Monitoring=Monitoring+1.
VALUE LABELS CaseControl 1 'Survivor (Control)' 2 'Death (Case)'
/Monitoring 1 'Adequate' 2 'Inadequate'.

GENLIN CaseControl (REFERENCE=FIRST) BY Monitoring (ORDER=DESCENDING)
 /MODEL Monitoring INTERCEPT=YES
  DISTRIBUTION=BINOMIAL LINK=LOGIT
 /CRITERIA METHOD=FISHER SCALE=1 ANALYSISTYPE=3(LR) CILEVEL=95
LIKELIHOOD=FULL
 /REPEATED SUBJECT=PairNumber SORT=YES CORRTYPE=INDEPENDENT
ADJUSTCORR=YES COVB=ROBUST
 /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

Still puzzled.

Marta GG


--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: 1:1 Matched case-control study using GENLIN (and not succeeding)

Ryan
Come to think of it, I don't think my understanding is correct. Anyway, please do write back and clarify, if you have the time. You've piqued my interest! Essentially, I assume you want to adjust for within-subject correlations, correct? We need to identify the subject id variable and the within-subjects (aka repeated measures) variable. That will help us arrive at the solution. -Ryan

rblack wrote
Marta,

Here's what I'm assuming for the generalized estimating equation you are attempting to construct:

(1) dependent variable = CaseControl
(2) between-subjects (categorical) independent variable = Monitoring
(3) subject ID variable = PairNumber
(4) within-subjects variable = S (the level of this variable repeats within subjects)

If I'm correct so far, then one potentially proper parameterization would be coded as follows:

* Generalized Estimating Equations.
GENLIN CaseControl (REFERENCE=FIRST) BY Monitoring (ORDER=DESCENDING)
  /MODEL Monitoring INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /CRITERIA METHOD=FISHER(1) SCALE=1 MAXITERATIONS=100 MAXSTEPHALVING=5 PCONVERGE=1E-006(ABSOLUTE)
    SINGULAR=1E-012 ANALYSISTYPE=3(WALD) CILEVEL=95 LIKELIHOOD=FULL
  /REPEATED SUBJECT=PairNumber WITHINSUBJECT=S SORT=YES CORRTYPE=EXCHANGEABLE ADJUSTCORR=YES
    COVB=ROBUST MAXITERATIONS=100 PCONVERGE=1e-006(ABSOLUTE) UPDATECORR=1
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

Note that I have allowed for a non-zero covariance by specifying the "EXCHANGEABLE" var-cov residual matrix.

This is not what I'd consider to be the full model, but I do think this parameterization captures what you're after. Feel free to write back if I'm off base here.

HTH,

Ryan
García-Granero wrote
MaxJasper wrote:
> You cannot use 0 for case or for control.
> Control# > Case# >0
>
> So, use:
> Control=2
> Case=1
>

Thanks Max, but I'm NOT getting an error message, just a wrong estimate.
I followed your indication, but this is not working either:

* Avoiding 0 (I tried recoding only CaseControl, and then Monitoring
too, but same result) *.
COMPUTE CaseControl=CaseControl+1.
COMPUTE Monitoring=Monitoring+1.
VALUE LABELS CaseControl 1 'Survivor (Control)' 2 'Death (Case)'
/Monitoring 1 'Adequate' 2 'Inadequate'.

GENLIN CaseControl (REFERENCE=FIRST) BY Monitoring (ORDER=DESCENDING)
 /MODEL Monitoring INTERCEPT=YES
  DISTRIBUTION=BINOMIAL LINK=LOGIT
 /CRITERIA METHOD=FISHER SCALE=1 ANALYSISTYPE=3(LR) CILEVEL=95
LIKELIHOOD=FULL
 /REPEATED SUBJECT=PairNumber SORT=YES CORRTYPE=INDEPENDENT
ADJUSTCORR=YES COVB=ROBUST
 /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

Still puzzled.

Marta GG


--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: 1:1 Matched case-control study using GENLIN (and not succeeding)

Bruce Weaver
Administrator
In reply to this post by Marta Garcia-Granero
Hi Marta.  I don't have time to study this carefully right now, but you might find something useful in a thread I started in the SPSS newsgroup about a year ago. Mind the line-wrap!

http://groups.google.com/group/comp.soft-sys.stat.spss/browse_frm/thread/ce4c51d35ea66713/cdccfbc40e0f35b3?lnk=gst&q=Weaver+Logistic+regression+%28via+GENLIN%29#cdccfbc40e0f35b3

HTH.
Bruce

p.s. - You should be able to run your model via NOMREG too.  See:

   http://faculty.chass.ncsu.edu/garson/PA765/logistic.htm#matchedconditional



García-Granero wrote
Hi everybody:

I need some help trying to get the correct OR for a 1:1 matched
case-control study:

* Sample dataset (from Campell's "Statistics at Square Two") 1:1 matched
case-control study *.
DATA LIST FREE/PairNumber CaseControl Monitoring (3 F8).
BEGIN DATA
 1 1 1  1 0 1  2 1 1  2 0 1  3 1 1  3 0 1  4 1 1  4 0 1  5 1 1  5 0 1
 6 1 1  6 0 1  7 1 1  7 0 1  8 1 1  8 0 1  9 1 1  9 0 1 10 1 1 10 0 1
11 1 1 11 0 0 12 1 1 12 0 0 13 1 1 13 0 0 14 1 1 14 0 0 15 1 1 15 0 0
16 1 1 16 0 0 17 1 1 17 0 0 18 1 1 18 0 0 19 1 1 19 0 0 20 1 1 20 0 0
21 1 1 21 0 0 22 1 1 22 0 0 23 1 1 23 0 0 24 1 0 24 0 1 25 1 0 25 0 1
26 1 0 26 0 1 27 1 0 27 0 0 28 1 0 28 0 0 29 1 0 29 0 0 30 1 0 30 0 0
31 1 0 31 0 0 32 1 0 32 0 0 33 1 0 33 0 0 34 1 0 34 0 0 35 1 0 35 0 0
END DATA.
VALUE LABELS CaseControl 0 'Survivor (Control)' 1 'Death (Case)'
/Monitoring 0 'Adequate' 1 'Inadequate'.

* Goal (from Campbell's book and hand calculations): OR=4.333 (95%CI:
1.235 to 15.206) *.

* Using stratified analysis (Mantel-Haenszel estimator of OR): Correct *.
CROSSTABS
  /TABLES=Monitoring BY CaseControl BY PairNumber
  /FORMAT=NOTABLES
  /STATISTICS=CMH(1).

* Using COXREG (with a false time variable called "S": Correct *.
COMPUTE S=(CaseControl=0)+1.
COXREG S
  /STATUS=CaseControl(1)
  /STRATA=PairNumber
  /CONTRAST (Monitoring)=Indicator(1)
  /METHOD=ENTER Monitoring
  /PRINT=CI(95).

* Using GENLIN: NOT Correct *.
GENLIN CaseControl (REFERENCE=FIRST) BY Monitoring (ORDER=DESCENDING)
  /MODEL Monitoring INTERCEPT=YES
   DISTRIBUTION=BINOMIAL LINK=LOGIT
  /CRITERIA METHOD=FISHER SCALE=1 ANALYSISTYPE=3(LR) CILEVEL=95
LIKELIHOOD=FULL
  /REPEATED SUBJECT=PairNumber SORT=YES CORRTYPE=INDEPENDENT
ADJUSTCORR=YES COVB=ROBUST
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

Why is my GENLIN syntax not correct ?

Thanks in advance

Marta GG

--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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/).