Programming the statistical procedures from SAS

Conditional Logistic for Paired Data

Reply
N/A
Posts: 0

Conditional Logistic for Paired Data

Hi all! I have a question and need some coding help.

I am analyzing a survey with paired data - parents and patients fill in the survey, and I want to conduct logistic regression (controlling for sex, age and time since diagnosis) to assess whether parents were more likely than patients (group=1 vs group=0) to answer correctly (response=1 vs. response=0), accounting for the paired matches (shared ID between two respondents).

I understand that a conditional logistic regression analysis is the correct analysis to run - is this correct?

When I try to run it, I'm not getting good results. My code is below. However, I am not getting Parameter Estimates (or hazard ratios) for the covariates (age, sex, timedx), and when I remove or add covariates, the Estimate for group does not change.

Please help!
Eric

My code:

data binomial;
set dataset;
Time=2-response;
output binomial;
run;

proc sort data=binomial;
by id;
run;

proc phreg data=binomial;
TITLE 'DIAGNOSIS';
model Time*response(0)= group age sex timedx /ties=discrete risklimits;
strata id;
run;
Frequent Contributor
Posts: 140

Re: Conditional Logistic for Paired Data

> Hi all! I have a question and need some coding
> help.
>
> I am analyzing a survey with paired data - parents
> and patients fill in the survey, and I want to
> conduct logistic regression (controlling for sex, age
> and time since diagnosis) to assess whether parents
> were more likely than patients (group=1 vs group=0)
> to answer correctly (response=1 vs. response=0),
> accounting for the paired matches (shared ID between
> two respondents).
>
> I understand that a conditional logistic regression
> analysis is the correct analysis to run - is this
> correct?
>
> When I try to run it, I'm not getting good results.
> My code is below. However, I am not getting
> Parameter Estimates (or hazard ratios) for the
> covariates (age, sex, timedx), and when I remove or
> add covariates, the Estimate for group does not
> change.
>
> Please help!
> Eric
>
> My code:
>
> data binomial;
> set dataset;
> Time=2-response;
> output binomial;
> un;
>
> proc sort data=binomial;
> by id;
> un;
>
> proc phreg data=binomial;
> TITLE 'DIAGNOSIS';
> model Time*response(0)= group age sex timedx
> /ties=discrete risklimits;
> strata id;
> un;

First off, if you want probability of doing something, you don't want PHREG, that's for survival analysis, not logistic regressions.

The usual PROC for logistic regression is PROC LOGISTIC.

But you have paired data, so I would look into e.g PROC GLIMMIX.

You might also want to look at the book "Dyadic data analysis" by Kenny, Kashy and Cook.


An alternative is to have a four level response: YY YN NY NN for parent and child response, and then model that in LOGISTIC with the glogit link

HTH

Peter
SAS Employee
Posts: 242

Re: Conditional Logistic for Paired Data

You can use the STRATA statement in PROC LOGISTIC for this without needing to use PROC PHREG anymore. See the "Conditional Logistic Regression for Matched Pairs Data" example in the LOGISTIC documentation:

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/logistic_toc.htm
Ask a Question
Discussion stats
  • 2 replies
  • 311 views
  • 0 likes
  • 3 in conversation