Programming the statistical procedures from SAS

Regression Model Using Dummy Variable

Reply
New Contributor
Posts: 2

Regression Model Using Dummy Variable

Hi,

 

I am a SAS toddler and running a regression model using dummy variable for an event study. My model is

 

Realized Return = Expected Return + Dummy for event day (Day -10 to Day +10)

 

proc reg data=work.germanyindex;
model RR = ER DB10 DB09 DB08 DB07 DB06 DB05 DB04 DB03 DB02 DB01 DDAY DA01 DA02 DA03 DA04 DA05 DA06 DA07 DA08 DA09 DA10;
run;

 

In the model, RR means realized return, and ER is expected return, and DB10 to DA10 is date dummy consist of 0 or 1. I have around 270 observations in my dataset.

 

However, if I run this regression, SAS says:

 

 

Note:Model is not full rank. Least-squares solutions for the parameters are not unique. Some statistics will be misleading. A reported DF of 0 or B means that the estimate is biased.

 

Note:The following parameters have been set to 0, since the variables are a linear combination of other variables as shown.

 

and I cannot get coefficient of ER variable nor std. error, t-stats, and prob. 

 

I do not know what can I do for this. Is it a data problem? or coding? I attached my dataset just in case. 

 

I will appreciate your help.

Attachment
Super User
Posts: 18,529

Re: Regression Model Using Dummy Variable

Remember when coding dummy variables you include N-1 variables for N levels. 

This is because if you have 3 levels you only need two variables to uniquely identify all 3 scenarios.

New Contributor
Posts: 2

Re: Regression Model Using Dummy Variable

You mean number of dummy variables by levels? I have dummy variables for each 21 days, so I need to remove one of dummy variable?

 

Or, values of variable? DB10 - DA10 is consist of 1 and 0, but do I need to make blank for 0s?

 

Sorry for asking you additional question.

I am real beginner of SAS, so these question could be stupid. please understand.

Super User
Posts: 18,529

Re: Regression Model Using Dummy Variable

This isn't a SAS question, it's a statistics question. SAS is simply a program for applying statistical knowledge, you still need to understand the statistical methodology.

 

If you have a variable that can be expressed as a linear combination of other variables, it is not independent. So if you have 0/1 for every day, then you have overspecified the model and need to remove one of the day variables. 

 

A more detailed write up:

http://stats.idre.ucla.edu/other/mult-pkg/faq/general/faqwhat-is-dummy-coding/

 

 

Ask a Question
Discussion stats
  • 3 replies
  • 176 views
  • 0 likes
  • 2 in conversation