BookmarkSubscribeRSS Feed
kcbusse
Calcite | Level 5

Hi everyone, 

 

I'm new to SAS and I've got a problem here with the program being stuck on running. I have read the other posts about this before but nothing seemed to jump out to me on how exactly to fix this. I'm analyzing data using the Mixed Model task. I have 8 different excel sheets that I'm running full and reduced models for. When I started out, I had no problem running the mixed models on the data. 

Now for the last 3 excel sheets I have, SAS is having difficulties apparently running the program for full and reduced models. It runs for hours without giving me a readout and when I try to cancel the job after a while it tells me that the cancel feature isn't working and to just terminate the session altogether. 

This is the code that I've been using for all of my excel sheets and I'm not entirely certain as to why its suddenly causing this problem now, if it even is:

ods noproctitle;
ods graphics / imagemap=on;

proc mixed data=WORK.PARSEDINDSLEEPDAY23142 method=type3 plots=(residualPanel) 
alpha=0.05;
class Line Sex Rep;
model Bout_length=Line*Sex Line Sex /;
random Rep(Line) Rep(Line*Sex) /;
run;

Does anyone have any thoughts as to what is going on? Is it something I've put in incorrectly?

Thanks

 

4 REPLIES 4
ballardw
Super User

How many records are involved?

How many different levels of your class variables, count of each one, are there in your data? Proc Freq will tell you this.

 

If you are having problems with unstable sessions I would suggest placing your data into a permanent library instead of work so that you don't have to rebuild your data prior to running the model.

kcbusse
Calcite | Level 5

The data file I have is quite large, over thousands of entries. 

When I ran the PROC FREQ command you suggested, I first looked at the dependent variable I'm using in the mixed model, "Bout_length". It returned a level of 668

The explanatory variables I use in the mixed model are rep, sex, and line, which are just 2, 2, and 3 levels respectively. 

I normally will use the PROC SQL feature to separate it out into a sheet for a single line and its control, which I then run the mixed model on. 

Reeza
Super User
Have you tried running it on a subset of the data and see what happens? If it runs for the first 4000 rows but won't for the full 8000 for example?

Did you confirm that the variable types match across the different worksheets after being imported and that the range of values is consistent between all the worksheets?

Pipe your log and output to different locations so you can still see if any errors were generated and retrieve any output. Look into PROC PRINTTO to redirect your log and ODS to pipe the results to a different output such as PDF or Word document.
kcbusse
Calcite | Level 5

Normally I will import the data sheet, and check to ensure that everything has imported correctly and that all of the different headers match with what they should be. 

From there I run the PROC SQL feature. I have 3 lines: 2 experimental and 1 control. So I will use PROC SQL to make a separate table for each experimental line. Each also contains the entries for the control of course. 

 

Once I have these separate excel files, I run each one through the mixed model. Usually it works fine but for this data, it's just stuck on the loop. I have about 8000+ entries though once I've separated out the excel sheets.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 2813 views
  • 2 likes
  • 3 in conversation