Help using Base SAS procedures

PROC GLM Error Message

Accepted Solution Solved
Reply
Contributor
Posts: 22
Accepted Solution

PROC GLM Error Message

I am receiving the following error in the log after submitting this PROC GLM code.

 

 

proc glm data=dsn;
by segment;
class trim model category subsegment;
model price = trim model age category subsegment;
quit;

The error is:

 

"One or more variables are missing or freq or weight is zero on every observation."

 

I know the error is coming from the subsegment variable because I added the variables one at a time before getting an error with subsegment. 

 

I'm not sure how to diagnose the source of the error. Subsegment does have a 2% missing rate, but not all values are missing. Besides, I thought PROC GLM would simply exclude observations with missing input values. 

 

Can anyone provide help on the source of this error?

 

Thank you.

 

Dhrumil Patel

 


Accepted Solutions
Solution
‎07-26-2016 04:48 PM
Respected Advisor
Posts: 4,756

Re: PROC GLM Error Message

GLM does separate analysis for every BY-value. Check that subsegment is not entirely missing for one of the segments.

PG

View solution in original post


All Replies
Super User
Posts: 18,589

Re: PROC GLM Error Message

Post your log and look at output from proc freq on variable. My guess is you misspelled the variable name?

Contributor
Posts: 22

Re: PROC GLM Error Message

Thanks for your reply.

 

I checked it wasn't from misspelling the variable name. It was because of my BY statement. There were combinations of segment and subsegment where the values were completely missing.

 

Dhrumil

Solution
‎07-26-2016 04:48 PM
Respected Advisor
Posts: 4,756

Re: PROC GLM Error Message

GLM does separate analysis for every BY-value. Check that subsegment is not entirely missing for one of the segments.

PG
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 924 views
  • 4 likes
  • 3 in conversation