BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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;
2 REPLIES 2
plf515
Lapis Lazuli | Level 10
> 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
StatDave
SAS Super FREQ
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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1608 views
  • 0 likes
  • 3 in conversation