This LaTeX document is available as postscript or asAdobe PDF.

10-637 Animal Models

L. R. Schaeffer, March 1999

Question 1

The concept of "verify" or "prove" or "show that", in pure statistics means to take the proposed equality, say A=B, and through manipulation of A, for example, to derive an expression equal to B. It is not generally acceptable to begin a proof by assuming that the two quantities are indeed equal. Also, it is not a good proof to show that A can be manipulated to give C, and then to show that B can also be manipulated to give C. In the following, take the left hand side of the equality and show that it is equal to the right hand side.

(a)

(b)

(c)

(d)

(e)

Question 2

This question requires a lot of concentrated effort to keep all of the p's and q's straight, but it can be done.

Question 3

The following SAS program can be used to answer this question. By changing the variable 'nrep' at the beginning to 1 or 10 or 1000, the answers to the question can be generated. The frequency tables that come out are by generation number so that changes from generation to generation may be plotted.

The main points to observe are that with only one replicate the allele frequency after 10 generations can be above or below the starting frequency of .26. Likewise the genetic variance may be high or low depending on the frequency. Averaging results over 10 replicates gives a better picture. The average allele frequency stays close to .26 over 10 generations, and the genetic variance should reduce towards an expected value of

The variance of the allele frequency in generation 10 across replicates has an expected value of

The more replicates that you do, the closer is the agreement to the expected values.

  %let popsize=20;
%let seed=123456;
%let pa=0.26;
%let ngen=10;
%let nrep=10;
%let avalu=1;

title 'Lesson 4 Assignment';
options nocenter ls=80;

data a;
seed=&seed;
retain seed;
array gm{&popsize,2};
array prg{&popsize,2};
keep mrep gen fq1 mug vg;
mrep=0;
do i=1 to &nrep by 1;
mrep = mrep + 1;
gen = 0;
ug=0.;  vg=0.;  fq1=0.;

do k=1 to &popsize by 1;
g1=1;
call ranuni(seed,x);
if x>&pa then g1=0;
fq1 = fq1 + g1;

g2=1;
call ranuni(seed,x);
if x>&pa then g2=0;
fq1 = fq1 + g2;

gm{k,1}=g1;
gm{k,2}=g2;
g3=g1+g2;
pval=0.;
if g3 = 0 then pval=-&avalu;
if g3 = 2 then pval=&avalu;
ug=ug+pval;
vg=vg+pval*pval;
end;

mug=ug/&popsize;
vg = vg - mug*ug;
vg = vg / (&popsize - 1);
fq1 = fq1 / (2*(&popsize));
output;

/* Generate progeny generations */
do j=1 to &ngen by 1;
gen = gen + 1;
ug=0.;  vg=0.;  fq1=0.;
do k=1 to &popsize by 1;
/* Choose parents of next animal */
call ranuni(seed,x);
ix=int((x*&popsize)+1);
if ix > &popsize then ix = 1;
call ranuni(seed,x);
iy=int((x*&popsize)+1);
if iy > &popsize then iy = 1;
/* Generate genotype of offspring */
call ranuni(seed,x);
g1 = gm{ix,1}; if x > .5 then g1 = gm{ix,2};
call ranuni(seed,x);
g2 = gm{iy,1}; if x > .5 then g2 = gm{iy,2};
g3=g1+g2;
fq1=fq1+g1+g2;
pval=0.;
if g3 = 0 then pval=-&avalu;
if g3 = 2 then pval=&avalu;
ug=ug+pval; vg=vg+pavl*pval;
prg{k,1}=g1; prg{k,2}=g2;
end;
mug= ug/&popsize;
vg=vg-mug*ug;  vg=vg/(&popsize - 1);
fq1=fq1/(2*(&popsize));
output;

do k=1 to &popsize by 1;
gm{k,1}=prg{k,1};
gm{k,2}=prg{k,2};
end;
end;
end;

proc sort; by gen;

proc means n mean var; by gen;


This LaTeX document is available as postscript or asAdobe PDF.

Larry Schaeffer
1999-02-26