Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Dummy Variable

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 05-10-2019 06:19 AM
(1203 views)

Hi Community,

Every time I run Rogers standard errors model, I get .... for the dummy variable yr12, although my sample has data on yr12. Your assistance is highly appreciated.

DATA Aac; * Full sample;

set Aac;

proc surveyreg data=Aac;

cluster year;

model Aac_int = EB_Aac1 NewReg LagEarnings2 LagAac_int

yr00 yr01 yr02 yr03 yr04 yr05 yr06 yr07 yr08 yr09

yr10 yr11 yr12 yr13 yr14 yr15 yr16 yr17 /ADJRSQ ; run;

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

In PROC SURVEYREG, there's no need to create your own dummy variables, the CLASS statement will do that for you behind the scenes.

In your case, the regression coefficient of yr12 cannot be estimated because it is not independent of the other variables yr00-yr17. This is not an error, this is the way SAS (and probably most other statistical programs) handle the situation. Consider the simple case where you have dummy variables for male and female. If you know the dummy variable (0 or 1) for male, then you also know the dummy variable 0 or 1 for female, these are completely dependent on one another and so a dummy variable for female adds no new information. The same is true for yr12 ... if you know yr00-yr11 and yr13-yr17, then you know exactly yr12, it adds no new information.

Rather than look at the regression coefficients for your dummy variables, you want to look at the least squares means for your dummy variables using the LSMEANS statement. This will overcome the problems mentioned above.

--

Paige Miller

Paige Miller

6 REPLIES 6

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Show us the output you are getting. Copy the text and then paste it into the window that appears when you click on the {i} icon.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I also attached the file in my previous message if you like to run the model.

Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

The model works fine as I drop yr12.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

In PROC SURVEYREG, there's no need to create your own dummy variables, the CLASS statement will do that for you behind the scenes.

In your case, the regression coefficient of yr12 cannot be estimated because it is not independent of the other variables yr00-yr17. This is not an error, this is the way SAS (and probably most other statistical programs) handle the situation. Consider the simple case where you have dummy variables for male and female. If you know the dummy variable (0 or 1) for male, then you also know the dummy variable 0 or 1 for female, these are completely dependent on one another and so a dummy variable for female adds no new information. The same is true for yr12 ... if you know yr00-yr11 and yr13-yr17, then you know exactly yr12, it adds no new information.

Rather than look at the regression coefficients for your dummy variables, you want to look at the least squares means for your dummy variables using the LSMEANS statement. This will overcome the problems mentioned above.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you so much.

Are you ready for the spotlight? We're accepting content ideas for **SAS Innovate 2025** to be held May 6-9 in Orlando, FL. The call is **open **until September 16. Read more here about **why** you should contribute and **what is in it** for you!

What is ANOVA?

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.