welcome:

## Description of problem

A common problem in quantitative genetics is the estimation of the variation in the various genetic and environmental components that contribute to the variation in a trait. The most important component is usually the additive component, which is related to the strength of natural selection. This variation can be estimated from controlled mating experiments. Traditionally, the additive variance is estimated from the Male effect but here we are able to include the contributions from all of the levels of the experiment, which is clearly a more efficient use of the data

The data comes from part of a data set on survival of tadpoles, which used a "North Carolina I" design. 30 males were used in the experiment, and each one was mated to two females. The females were only mated to a single male. The eggs from each cross were split up into groups of between 15 and 51 eggs, and placed in several treatments and blocks. The data here comes from the high pH treatment, and two of the blocks (for simplicity, the block effect is not modelled here). The trait of interest is whether a tadpole survives to Gosner Growth Stage 25 (whatever that is). We also use the average egg size for a female as a covariate. The number of tadpoles in a batch of size Ni that survive to GS25 is ni. We then use mixed model logistic regression:

• ni ~ Bin(Ni, pi)

logit(pi) ~N( μi, σ2e)

where

μi = μ0 + (αs + αd)/2 + βd, + δd/4

• αs, αd ~ N(0, VAdd)

βd ~ N(0, VMat)

δd ~ N(0, VDom)

where μ0 is the overall mean, αs and αd are the sire's and dam's breeding values, βd is the maternal effect and δd is the dominance effect. σ2e is the residual variance, which is made up of contributions from the additive and dominance variation, due to segregation. Rather than writing this as the sum of the variance contributions, it is quicker to simulate the errors directly, i.e. write

μi = μ0 + (αs + αd)/2 + βd, + δd/4

• + εia/21/2 + (3/4)1/2 εdi

where εa;i ~ N (0, VAdd) and + εdi ~ N (0, VDom). Now σ2e is VEnvW, the within environment variance.

Because of the design of the experiemnt, there are identifiability problems with VDom, VEnvW and VMat. However, our main interest is in the proportion of the total variance explained by VAdd, i.e. h2 = VAdd/(VAdd + VDom + VMat + VEnvW)

VAdd, VDom, VMat and VEnvW are all given uninformative uniform priors with an upper limit that is larger than possible (i.e. much larger than the variance of the data). This gives better frequentist properties than the inverse gamma distribution.

## BUGS Code

```model;
{
for(i in 1 : N)   {
dom.err[i] ~ dnorm(0, TauDom)
error[i] ~ dnorm( 0.0,TauEnvW)

logit(pp[i]) <- Mu0 + (alphaMale[Male[i]] + alphaFemale[Male[i], Female[i]])/2 + maternal[Male[i], Female[i]] +
Delta[Male[i], Female[i]]/2 + add.err[i]/sqrt(2) + sqrt(3/4)*dom.err[i] + error[i]
Alive[i] ~ dbin(pp[i],Total[i])
}
for(m in 1 : MaleTot) {
for(f in 1:2) {
maternal[m,f] ~ dnorm( 0,TauMat)
Delta[m,f] ~ dnorm( 0,TauDom)
}
}
Mu0 ~ dnorm( 0,0.1)

VarDom ~ dunif( 0,1000)
VarEnvW ~ dunif( 0,1000)
VarMat ~ dunif( 0,1000)

TauDom <- 1/VarDom
TauEnvW <- 1/VarEnvW
TauMat <- 1/VarMat

TotVar <- VarAdd + VarDom + VarEnvW + VarMat
}```

## Inits

`list(VarAdd =1, VarDom =1, VarEnvW =1, VarMat =1)`

## Results

Two chains were run, and after a burn-in of 1000 iterations, a further 10000 iterations per chain were run, to give 2x10000 samples. This took 130 seconds on a 2GHz processor.

 mean sd MC_error val2.5pc median val97.5pc start sample Heritability 0.1295 0.1086 0.006233 0.009633 0.1043 0.4065 1001 20000 Mu0 1.818 0.2898 0.01345 1.27 1.806 2.427 1001 20000 VarAdd 0.5855 0.4927 0.02826 0.04388 0.4738 1.837 1001 20000 VarDom 0.3026 0.2525 0.0138 0.02443 0.241 0.9459 1001 20000 VarEnvW 0.2269 0.1914 0.009831 0.01516 0.1799 0.7208 1001 20000 VarMat 3.544 1.045 0.03034 1.8 3.445 5.907 1001 20000

The posterior for the heritability is low compared to the typical value of around 0.2. The Maternal component has the largest variance, suggesting that there is a large variation in maternal effect on early survival.

UserContributedCode/TadpoleSurvival (last edited 2009-10-27 10:02:16 by BobOH)