BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
lady8506
Quartz | Level 8

 

I have been using a subset of my data to practice logistic regression and when the results are output, the "Class Level Information" table is missing. I'm not sure why this is. Can someone take a look at my code and my data and tell me what might be causing the problem? 

 

Also, would it be better to use the CLASS statement in PROC LOGISTIC, or to dummy code everything myself instead? At this point, I'm not sure what the difference is.

 

Here is my code:

 

TITLE "Logistic Regression: Reconstruction or not";
PROC LOGISTIC DATA = merge_temp7 descending;
CLASS HistologyGroup TumorStageGroup;
MODEL BreastConservingTherapy = Age1 had_chemo; 
RUN;

HistologyGroup can have the following values: 2, 3, 4  Refers to the type of tumor they have

TumorStageGroup can have the following values: 0, 1, 2, 3, 4   Refers to the stage of the tumor

BreastConservingTherapy can be either 1 for 'yes" or 0 for 'no' and refers to the type of surgery a person had

had_chemo is the same as BreastConservingTherapy. Did the patient receive chemo or not?

Age1 is a person's age, so it's continuous.

 

Here is some sample data from those variables:

SAS Output

HistologyGroup TumorStageGroup BreastConservingTherapy Age1 had_chemo
230661
420641
430461
221601
421601
410840
411590
410461
411560
301680
411510
300510
41.40.
410421
420640
3.0350
430611
420491
42049.
410400
421710
411541
411770
430471
430751
421530
301520
301660
41172.
1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

You didn't include the class variables in your model.

 

PROC LOGISTIC DATA = merge_temp7 descending;
CLASS HistologyGroup TumorStageGroup;
MODEL BreastConservingTherapy = Age1 had_chemo    HistologyGroup TumorStageGroup; 

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

You want to use

 

MODEL BreastConservingTherapy = Age1 had_chemo HistologyGroup TumorStageGroup; 

Also, do not try to code dummy variables to use instead of using the CLASS statement. Creating your own dummy variables is a total waste of time and an opportunity to make mistakes.

--
Paige Miller
Ksharp
Super User

You didn't include the class variables in your model.

 

PROC LOGISTIC DATA = merge_temp7 descending;
CLASS HistologyGroup TumorStageGroup;
MODEL BreastConservingTherapy = Age1 had_chemo    HistologyGroup TumorStageGroup; 
lady8506
Quartz | Level 8

Thank you for your help. What an easy fix. I feel silly now!

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
  • 3 replies
  • 1342 views
  • 2 likes
  • 3 in conversation