BookmarkSubscribeRSS Feed
xshinbrot0
Calcite | Level 5

Hi there SAS experts,

I have a question: I created two dummy variables: one that indicates the location ("dummy") and another that indicates a treatment within the location ("trt"). When I run a multiple regression model with each separately (and the other variables), SAS only omits one dummy variable, the last one, which is what is expected. However, when I include BOTH of the dummy variables there are a number of missing variables. The code I use is below. The output is attached. Why am I getting so many missing variables? How do I make sure that I only get ONE missing variable for each dummy?

proc glm data=adaptx;
class trt dummy;
model adaptation=ave_ha wealth group_partx market_distance exp_disaster cc_percep sex trt dummy/solution;
Run;
4 REPLIES 4
Reeza
Super User

I suspect this is an issue with your data, not the PROC. Run a FREQ on trt and dummy and you likely have some 0 cells.

 

And note the NOTE message. I suspect you don't have enough data for your model overall.

xshinbrot0
Calcite | Level 5

There are no missing values or zeros in the dummy or trt variables. I just checked.

 

I surveyed 300 people so have 300 lines of data... I'm surprised if I didn't have enough data!

Reeza
Super User

@xshinbrot0 wrote:

There are no missing values or zeros in the dummy or trt variables. I just checked.

 

I surveyed 300 people so have 300 lines of data... I'm surprised if I didn't have enough data!


Nope. You have 291 obs and only 269 are used for the procedure so you have something different than you're saying.

 

 

PaigeMiller
Diamond | Level 26

@xshinbrot0 wrote:

However, when I include BOTH of the dummy variables there are a number of missing variables.


Explain what this means. Be specific. Show us the results. (Your attachment doesn't display here, I get an error).

 

I agree with @Reeza, the most likely reason is that your data is causing this, even if there are no cells with zero data, another reason this can happen is that your data has linear combinations of the X variables that are constant. 

 

--
Paige Miller

SAS Innovate 2025: Call for Content

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 962 views
  • 0 likes
  • 3 in conversation