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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 719 views
  • 0 likes
  • 3 in conversation