ybao
ybao

Reputation: 147

PROC GENMOD Error: Nesting of continuous variable not allowed

I am doing cross-sectional logistic regression modeling of the probability of an event in eyes. Each patient is assigned an PatientID and each eye is assigned an EyeID; there are 2 eyes per patient.

I have attached my code blow.

PROC GENMOD data=new descend;
  class patientID Explan1(ref="0") Explan2(ref ="0") Gender(ref="M") / param=ref;
  model Therapy = PVD_STATUS Explan1 Explan2 Explan3 Gender/ dist=bin;
  repeated subject=patientID(EyeID) / corr=unstr corrw;
  run;

I get this error code: ERROR: Nesting of continuous variable not allowed.

This could be an issue related to the

repeated subject=patientID(EyeID)

Has anyone encountered this before? Possible solutions?

Upvotes: 1

Views: 993

Answers (1)

Stu Sztukowski
Stu Sztukowski

Reputation: 12909

Set EyeID as a class variable. SAS assumes that it is continuous unless otherwise defined.

PROC GENMOD data=new descend;
  class EyeID patientID Explan1(ref="0") Explan2(ref ="0") Gender(ref="M") / param=ref;
  model Therapy = PVD_STATUS Explan1 Explan2 Explan3 Gender/ dist=bin;
  repeated subject=patientID(EyeID) / corr=unstr corrw;
  run;

Upvotes: 1

Related Questions