0

I have a dataset on eyes with 2 eyes per patient. The data is clustered because the covariates such as age, gender, and ethnicity are the same for both eyes for that one patient.

This is my code so far:

PROC PHREG data = eyes covs(aggregate) plots(overlay)=(survival);
id patientid;
class Var1 (ref = "0") Gender (ref = "M") Ethnic Agegroup (ref = "0") / param = ref;
model TimeToTherapy*therapy(0) = Var1 Agegroup Gender Ethnic NumA1c/ ties=discrete rl;
strata patientid;
run;

However, when I run it, I get errors and hazard ratios, p-values, etc. enter image description here

However, when I take out the strata patientid; statement, everything works.

Is it necessary to keep this statement in there?

ybao
  • 147
  • 8
  • STRATA causes SAS to stratify the results for each patient, which is highly likely not what you want. I'm not sure PROC PHREG is designed to measure survival for multiple patients. If you're looking at multiple measures you may need to restructure your data. – Reeza Jan 28 '18 at 22:48
  • @Reeza The current structure is 1 eye per line, with the next eye in the next line. What structure do you recommend? – ybao Jan 29 '18 at 04:27

0 Answers0