regression degrees of freedom

noetsi

Fortran must die
#1
Maybe I am just tired, but I don't understand why the DF is 1 for variables that have many levels such as the RSA and have thousands of cases. Did I miss something about DF all these years :p This is a linear regression if it matters.

1555548820043.png
 

Dason

Ambassador to the humans
#2
It looks like your looking at the parameters estimated so if you are treating that variable as categorical it will have to make multiple columns for it and estimate multiple parameters. So it's showing one row for each parameter. Notice there are multiple rows for rsa.
 

hlsmith

Not a robit
#3
So if I remember proc reg doesn't have the class statement, so you have to dummy code them right?! Which variables should be treated as categorical?
 

noetsi

Fortran must die
#4
Each RSA is a different service (they are not the same variable). Also each have at least 8 distinct levels and some of these are truly interval in nature. Even the truly interval ones are showing 1 DF which confuses me.
 

hlsmith

Not a robit
#5
When you do a PROC CONTENTS, how is it defining these variables? If they are numbers, you gotta let the program know or if using PROC REG use created dummies - I know you know how to do that. I remember you working with me once on an option in PROC REG and using dummies.
 

noetsi

Fortran must die
#6
In enterprise guide it tells you what type of data is involved. All the RSA fields are numeric (interval) in nature. That shows up in the residuals to.
 

noetsi

Fortran must die
#8
I thought that the DF was the number of cases minus the number of parameters estimated. Or is that the df only for the regression equation and its calculated differently for slopes. Amazing that never came up before.
 
Last edited:

noetsi

Fortran must die
#10
It turns out the df for an interval predictor and dependent variable is always 1. I am talking about the parameter, t test, not the model DF.