BookmarkSubscribeRSS Feed
kirillschmidt
Calcite | Level 5

Hello! 
I have a small problem with proc inbreed. 
I need to calculate inbreeding coefficient for 1,700,000 individs. But my computer stopped processing because of insufficient memory. I tried to do it for 20,000 individs and SAS-file was about 3gb.Why does it take so much memory?  Maybe I do something wrong. Are there any ideas how to fix/solve it? Thank you! And sorry for stupid questions.

3 REPLIES 3
ballardw
Super User

You might try the NOPRINT option and direct the output to a dataset using the OUTCOV= option. Some times these memory issues come from massive amounts of output sent to a results window. Then use proc print or other option to examine the pieces you are interested in from the output set.

 

Also the specific options involved may increase memory needs. It might help to show your code for someone to suggest efficiency changes.

kirillschmidt
Calcite | Level 5

Thanks for reply! Yes, I use NOPRINT in my code.  And  my code is really easy.  So I don't know what to do. Seems this SAS procedure is the best solution for my need but final sas7bdat-file  is unreally big for my pc.  

My code is here.


proc inbreed data=example1 outcov=A covar matrix NOPRINT;
var individ mother father;
run;

 

 

 

/*example1 is 1.7M  x  3 table*/

ballardw
Super User

Did you happen to note how many variables are in the OUTCOV data when you ran this with 20000 records? Then consider the 1.7M.

 

You might consider, if practical, adding a generation or similar class variable to subset the data a bit.

 

If you have repeats of mother father reduce to a single one. Your current code is basically assuming everyone is in the same generation so repeats of family members in the same generation don't add much information while adding many more columns. The individuals would have the same relationship to external-to-the-family members.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 709 views
  • 0 likes
  • 2 in conversation