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