regression degrees of freedom

noetsi

No cake for spunky
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 This is a linear regression if it matters.

Dason

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

Less is more. Stay pure. Stay poor.
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

No cake for spunky
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

Less is more. Stay pure. Stay poor.
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

No cake for spunky
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

No cake for spunky
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

No cake for spunky
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.

noetsi

No cake for spunky
I mean yeah... Nobody has ever said otherwise...
I did not mean they had. I was the one confused. I had only ever seen the df calculation for the overall model before not the slope t test.