[R-sig-ME] MCMCglmm R-structure problem in heteroskedastic model
Paul Johnson
Paul.Johnson at glasgow.ac.uk
Wed Feb 2 02:11:58 CET 2011
Hello,
I'm using MCMCglmm to estimate heritability of lung function in a data set with 1346 nuclear families, each family having 2 parents and at least 1 offspring (total n=4777). I'm having trouble with a particular model:
########################
> prior.model3<-list(R=list(nu=0.02,V=diag(2)),G=list(G1=list(nu=0.02,V=1)))
> model3<-
+ MCMCglmm(fixed.form,
+ random=~animal,
+ pedigree=pedigree,
+ rcov=~idh(asthma.family):units,
+ prior=prior.model3,
+ data=mfs.fam,nitt=nitt,thin=thin,burnin=burnin)
Warning in MCMCglmm(fixed.form, random = ~animal, pedigree = pedigree, rcov = ~idh(asthma.family):units, :
some combinations in animal do not exist and 2692 missing records have been generated
Error in MCMCglmm(fixed.form, random = ~animal, pedigree = pedigree, rcov = ~idh(asthma.family):units, :
R-structure does not define unique residual for each data point
##########################
What I'm trying to do is estimate two different residual variances, one in families with at least 1 asthmatic (n=722 individuals) and one in the rest (n=4055 individuals), but as you can see I get an error. Can anyone see what the problem is?
Similar models work fine, including
1. a model with two variances [random=~animal, rcov=~units]
2. a model with 4 variances [random=~idh(asthma.family):animal, rcov=~idh(asthma.family):units].
3. a 3-variance model with a single residual variance and two animal variances [random=~idh(asthma.family):animal, rcov=~units].
(An odd thing about 2 and 3 above is that MCMCglmm warns me that "6730 missing records have been generated" which is exactly 2.5 times the 2692 that I'd expect).
Thanks for any help,
Paul Johnson
PS other details:
> R.Version()$version.string
[1] "R version 2.12.0 (2010-10-15)"
> Sys.info()
sysname release version nodename machine login user
"Windows" "7 x64" "build 7600" "PAUL-PC" "x86" "Paul" "Paul"
> cbind(installed.packages()["MCMCglmm",])
[,1]
Package "MCMCglmm"
LibPath "C:\\Users\\Paul\\Documents/R/win-library/2.12"
Version "2.10"
Priority NA
Depends "tensorA, Matrix, coda, ape, corpcor"
Imports NA
LinkingTo NA
Suggests "rgl, combinat, mvtnorm, orthopolynom"
Enhances NA
OS_type NA
License "GPL (>= 2)"
Archs "i386, x64"
Built "2.12.1"
The University of Glasgow, charity number SC004401
More information about the R-sig-mixed-models
mailing list