[R-sig-ME] pedigreemm with one observation per individual
David Duffy
David.Duffy at qimr.edu.au
Wed Feb 10 23:06:14 CET 2010
On Wed, 10 Feb 2010, Aaron Rendahl wrote:
> I'm trying to fit a mixed model using pedigreemm, but unlike any of
> the examples, I only have one observation per individual.
> I'm getting the following error:
>
> Error in function (fr, FL, start, REML, verbose) :
> Number of levels of a grouping factor for the random effects must
> be less than the number of observations
>
> However, with correlated random effects with a known correlation
> pattern, as with pedigree data, it seems this is a reasonable thing to
> do. Is there a way to tell lme4 to allow this in this case? Or is
> this still not a reasonable thing to do?
>
It is reasonable, especially when one wants to estimate breeding values
(so could be many more REs than observations).
Continuing the example (FWIW)...
library(kinship)
p1 <- data.frame(id=pedCowsR at label, fa=pedCowsR at sire, mo=pedCowsR at dam)
kmat <- kinship(p1$id, p1$fa, p1$mo)
lmekin(sdMilk ~ 1, data=m1, random = ~1|id, varlist=list(kmat))
Linear mixed-effects kinship model fit by maximum likelihood
Data: m1
Log-likelihood = -57.32775
n= 47
Fixed effects: sdMilk ~ 1
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.311032 0.1208144 35.6831 3.558233e-35
Random effects: ~1 | id
Variance list: list(kmat)
id resid
Standard Dev: 0.0025911150 0.8193825
% Variance: 0.0000099999 0.9999900
(Not a great example, as in herd 89, the half-sib correlation for this
variable, the sole source of information, is -0.04)
--
| 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