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
2 | 3 | 0 | 66 | 1 |
4 | 2 | 0 | 64 | 1 |
4 | 3 | 0 | 46 | 1 |
2 | 2 | 1 | 60 | 1 |
4 | 2 | 1 | 60 | 1 |
4 | 1 | 0 | 84 | 0 |
4 | 1 | 1 | 59 | 0 |
4 | 1 | 0 | 46 | 1 |
4 | 1 | 1 | 56 | 0 |
3 | 0 | 1 | 68 | 0 |
4 | 1 | 1 | 51 | 0 |
3 | 0 | 0 | 51 | 0 |
4 | 1 | . | 40 | . |
4 | 1 | 0 | 42 | 1 |
4 | 2 | 0 | 64 | 0 |
3 | . | 0 | 35 | 0 |
4 | 3 | 0 | 61 | 1 |
4 | 2 | 0 | 49 | 1 |
4 | 2 | 0 | 49 | . |
4 | 1 | 0 | 40 | 0 |
4 | 2 | 1 | 71 | 0 |
4 | 1 | 1 | 54 | 1 |
4 | 1 | 1 | 77 | 0 |
4 | 3 | 0 | 47 | 1 |
4 | 3 | 0 | 75 | 1 |
4 | 2 | 1 | 53 | 0 |
3 | 0 | 1 | 52 | 0 |
3 | 0 | 1 | 66 | 0 |
4 | 1 | 1 | 72 | . |
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;
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.
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;
Thank you for your help. What an easy fix. I feel silly now!
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.