[R-sig-ME] incorporating a kinship matrix
David Duffy
David.Duffy at qimr.edu.au
Thu Mar 11 22:59:08 CET 2010
On Thu, 11 Mar 2010, Pelle Ingvarsson wrote:
> However, including multiple observations of the same genotype is not possible
> in lmekin, where only a single observation is allowed per entry in the
> kinship matrix. Running a model with multiple observations per genotype
> results in:
>
> lmekin(budset~year+site+pos,data=bs,random=~1|clone,varlist=list(2*K),rescale=TRUE)
> Error in lmekin(budset ~ year + site + pos, data = bs, random = ~1 | clone,
> : The random effect must be 1 per subject
>
> (note: where K is the nxn kinship matrix, where n in the number of observed
> genotypes):
>
One way is to include an additional "genotype" (I presume genotype
corresponds to individual) for each of the multiple observations, and make
the kinship unity between the repeated records. You will then usually
encounter an error message from lmekin, complaining that it cannot invert
the matrix. If this is the case, we add a ridge constant of sufficient
size to the kinship matrix to make it invertible. I would also run the
analysis in WOMBAT, which is freely available (though not FLOSS) at
http://agbu.une.edu.au/kmeyer/wombat.html
It allows arbitrary covariance matrices, repeated records, and is very fast and accurate.
Cheers, David.
--
| David Duffy (MBBS PhD) ,-_|\
| email: davidD at qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / *
| Epidemiology Unit, Queensland Institute of Medical Research \_,-._/
| 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG 4D0B994A v
More information about the R-sig-mixed-models
mailing list