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

 Hi All 

I'm using proc mixed for my dataset today, and everything was fine except degrees of freedom of tow variables were wrong, I don't know where was my mistake, and I got this error. 

 

WARNING: Class levels for herd are not printed because of excessive size.
WARNING: Class levels for COW_ID are not printed because of excessive size.
ERROR: Integer overflow on computing amount of memory required. A request to allocate the memory
cannot be honored.
ERROR: The SAS System stopped processing this step because of insufficient memory.
NOTE: PROCEDURE MIXED used (Total process time):
real time 41.95 seconds
cpu time 12.93 seconds

 

 this error caused by code 2. Code 1 was good but degrees of freedoms were 1 for both (herd and cow_id) variables. but infact the number of cow_id and herd are more than a thousand!!! 

 

 

and this is my codes 

code 1 

proc sort data = fatd;
by time; run;
PROC MIXED DATA = fatd;
class pr CAMONTH CALVING_EASE ;
model A = HERD COW_ID PR CALVING_EASE CAMONTH CAYEAR / S ;
LSMEANS PR CAMONTH ;
RUN;


code 2 
proc sort data = fatd;
by time; run;
PROC MIXED DATA = fatd;
class pr CAMONTH CALVING_EASE  HERD COW_ID ;
model A = HERD COW_ID PR CALVING_EASE CAMONTH CAYEAR / S ;
LSMEANS PR CAMONTH  HERD COW_ID ;
RUN;

 thses results pf degrees of freedom from code 1, code 2 gaving error !!

 

 

1  for herd   and suppose to be more than 1 

1    for cow_id also suppose to be more than 1 

3  for camonth

2  for calving_ease

3 for pr 

1 for cayear  

these are the fd of my data 

kind regards 

 

1 ACCEPTED SOLUTION

Accepted Solutions
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

I imagine that cows are nested within herds, and I also imagine that herds and cows might be random effects factors rather than fixed effects factors. If you would like more input from the Community, please provide a more detailed description of your study, including the definitions of your factors and your research questions. An example of your data set would also be helpful; if you don't want to share the actual data, you can replace A values with something nonsensical.

 

How many different HERDs do you have? How many different COW_IDs?

 

I notice that you are sorting by time, but time is not included in your model. Is that your intent?

 

You may also have repeated measures on each cow, but again we would need more detail.

 

I recommend that you study SAS® for Mixed Models, Second Edition, it is an excellent resource.

 

 

View solution in original post

3 REPLIES 3
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

I imagine that cows are nested within herds, and I also imagine that herds and cows might be random effects factors rather than fixed effects factors. If you would like more input from the Community, please provide a more detailed description of your study, including the definitions of your factors and your research questions. An example of your data set would also be helpful; if you don't want to share the actual data, you can replace A values with something nonsensical.

 

How many different HERDs do you have? How many different COW_IDs?

 

I notice that you are sorting by time, but time is not included in your model. Is that your intent?

 

You may also have repeated measures on each cow, but again we would need more detail.

 

I recommend that you study SAS® for Mixed Models, Second Edition, it is an excellent resource.

 

 

Barkamih
Pyrite | Level 9

Thanks Sld 

 

Yes I changed that herd variable from fixed effect to the random effect and the cow_id removed from the model, the reason was because of the memory not enough to figure that out  and it giving a warning with error.  

 

 

in my data I have more than 5000 herds and more than one million cows. 

 

Thank you so much for these information

 

best regards  

sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

You might be able to use the HPMIXED procedure

 

The HPMIXED Procedure

 

It's designed for large linear mixed model problems.

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 2509 views
  • 2 likes
  • 2 in conversation