Status number, half the inverse of average coancestry, can be a helpful expression of diversity of a breeding population. See, for example, Lindgren, D., Gea, L and Jefferson, P. 1996. Loss of Genetic Diversity Monitored by Status Number. Silvae Genetica 45: 52–59 .
Assuming that you have a dataset containing your pedigree, with the following columns: tree (your unique individual identifier), mum (mother identifier) and dad (father identifier), it is possible to calculate status number using the following code:
set pedigree;
if mum = 0 then mum = .;
if dad = 0 then dad = .;
run;
proc inbreed data= pedigree noprint
covar matrix outcov = NRM(drop = _type_ _panel_ _col_ tree mum dad);
var tree mum dad;
run;
* Calculating the sum for each row of the NRM;
proc means data = NRM noprint;
var;
output out = rowmeans(drop = _type_ _freq_) sum = /autoname;
run;
/*
Insert code to remove founders here (see below).
The number of rows and columns to drop equals the
number of founders.
*/
* Getting a single column from which we can get sum(A) and nrow(A);
proc transpose data = rowmeans out = colmeans (drop = _name_);
run;
proc means data = colmeans noprint;
var col1;
output out = status(drop = _type_ _freq_) sum = sumA n = nrowA;
run;
data status;
set status;
statusN = (nrowA**2)/sumA;
run;
I have used it for pedigrees with 15,000 individuals without problems, although proc inbreed may take a while.
Update 2008–12–01: It may be necessary to remove founder parents (parents with unknown pedigrees) from the calculation. For example, if the first 300 individuals were founders, they could be removed thusly:
set NRM(drop = col1-col300);
if _n_ > 300;
run;
Keywords: SAS, Programming, Research.