BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
dhrumil_patel
Fluorite | Level 6

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

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

3 REPLIES 3
Reeza
Super User

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

dhrumil_patel
Fluorite | Level 6

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

PGStats
Opal | Level 21

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

PG

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 3216 views
  • 4 likes
  • 3 in conversation