2
$\begingroup$

I'm familiar with R^2 and adj R^2 for penalizing the addition of predictive variables in a regression.

I just want to double check that If I have three continuous predictor variables and 30 dummy variables to reflect 31 categories of the data how I should be using the equation below

adj R^2 = 1-(1-r^2)((n-1)/(n-k+1))

where

n is my number of samples

n = 1056

and s is my number of variables

s = 3 + 30

thanks

$\endgroup$
  • $\begingroup$ I have checked on google, just can't find anything specifically dealing with how to handle dummy variables in the calculation. $\endgroup$ – Hugh_Kelley Apr 23 at 9:41
3
$\begingroup$

You lose one degree of freedom for every variable. The formula does not know, nor care, whether that variable has many values or just two (a dummy). If there are collinearities in the model matrix then that means you just take account of the ones actually used although you have other issues to deal with then anyway.

$\endgroup$
  • $\begingroup$ awesome, thanks $\endgroup$ – Hugh_Kelley Apr 24 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.