Documentation Example 1 for PROC INBREED
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: INBREX1 */
/* TITLE: Documentation Example 1 for PROC INBREED */
/* PRODUCT: STAT */
/* SYSTEM: ALL */
/* KEYS: inbreed, covariance */
/* PROCS: INBREED */
/* DATA: */
/* */
/* SUPPORT: wehass UPDATE: September 7, 2007 */
/* REF: PROC INBREED, DOCUMENTATION EXAMPLE 1 */
/* MISC: */
/****************************************************************/
data Monoecious;
input Generation Individual Parent1 Parent2 Covariance @@;
datalines;
1 1 . . . 1 2 . . . 1 3 . . .
2 1 1 1 . 2 2 1 2 . 2 3 2 3 .
3 1 1 2 . 3 2 1 3 . 3 3 2 1 .
3 4 1 3 . 3 . 2 3 0.50 3 . 4 3 1.135
;
title 'Inbreeding within Nonoverlapping Generations';
proc inbreed ind covar matrix data=Monoecious;
class Generation;
run;
data Swine;
input Swine_Number $ Sire $ Dam $ Sex $;
datalines;
3504 2200 2501 M
3514 2521 3112 F
3519 2521 2501 F
2501 2200 3112 M
2789 3504 3514 F
3501 2521 3514 M
3712 3504 3514 F
3121 2200 3501 F
;
title 'Least Related Matings';
proc inbreed data=Swine ind average;
var Swine_Number Sire Dam;
matings 2501 / 3501 3504 ,
3712 / 3121;
gender Sex;
run;
data Swine;
input Group Swine_Number $ Sire $ Dam $ Sex $;
datalines;
1 2789 3504 3514 F
2 2501 2200 3112 .
2 3504 2501 3782 M
;
proc inbreed data=Swine covar noprint outcov=Covariance
init=0.4;
var Swine_Number Sire Dam;
gender Sex;
by Group;
run;
title 'Printout of OUTCOV= data set';
proc print data=Covariance;
format Col1-Col3 4.2;
run;