Re: [R-sig-phylo] How to incorporate intraspecific variation in MCMCglmm

```Hi Diogo,

```
First, your model1 is unlikely to be valid unless the residual variance happens to be 1. You should not fix it at one, and use a prior like:

```
prior = list(R = list(V = 1, nu = 0.02), G=list(G1=list(V=1, nu=0.02)))

```
Note that the residual variance (Ve) is the intra-specific variance, assumed constant over species, as in Lynch's h2/Pagels Lambda. If you have the standard error (se) of each observation you can also allow heterogeneity between observations as in random-effect meta-analysis:
```
random=~Specie+idh(se)

If you fix the variance associated with se at 1 in the prior

prior = list(R = list(V = 1, nu = 0.02), G=list(G1=list(V=1, nu=0.02),
G2=list(V=1, fix=1)))

Then the intraspecific variance for species i is se^2_i+Ve

If you do not fix the variance associated with se at 1, for example with

prior = list(R = list(V = 1, nu = 0.02), G=list(G1=list(V=1, nu=0.02),
G2=list(V=1, nu=0.02)))

and estimate the associated variance (Vse). Then the intraspecific variance
for species i is Vse*se^2_i+Ve. This is useful if you only know the standard
error up to proportionality.

Alternatively you can fit fixed-effect meta-analysis where all the
intraspecific variance is presumed to be due to sampling error:

random=~Specie, rcov=~idh(units):units

with prior:

prior = list(R = list(V = diag(se^2), fix=1), G=list(G1=list(V=1, nu=0.02)))

The intraspecific variance for species i is se^2_i. This is quite an
inefficient way of doing fixed-effect meta-analysis, and one day I will make
such analyses easier to fit, and quicker to fit......

Also, don't use nodes="TIPS" in the call to inverseA. I only allowed this option because
its the parameterisation used by most other software, but its a really bad way of doing it. Stick
with the default, node="ALL".

Cheers,

Jarrod

```
```

On 14/07/2017 14:26, Diogo B. Provete wrote:
```
```treeAinv<-inverseA(phylo,nodes="TIPS",scale=TRUE)\$Ainv

I included the following priors:

prior = list(R = list(V = 1, fix = 1), G=list(G1=list(V=1, nu=0.02)))
```
```

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
```