[R-sig-ME] MCMCglmm error message - data.frame subscripts

Jarrod Hadfield j.hadfield at ed.ac.uk
Sat Mar 30 10:55:46 CET 2013


Hi,

Does

m3 <- MCMCglmm(PP ~ 1, random=~animal, family="gaussian",  
pedigree=ped, data=pp9, nitt=100000, burnin=10000, thin=10)

give you the same error?

Cheers,

Jarrod



Quoting Liz Hare <doggene at earthlink.net> on Fri, 29 Mar 2013 15:47:36 -0400:

> Hello,
>
> I'm getting an error message with MCMCglmm that I can't figure out.
>
> The data:
>
> Pedigree
>
>> head(ped)
>    animal sire dam
> 1 1001001   NA  NA
> 2 1001002   NA  NA
> 3 1001003   NA  NA
> 4 1001004   NA  NA
> 5 1001005   NA  NA
> 6 1001006   NA  NA
>
> Phenotype
>
>> head(pp9)
>      animal  PP
> 36 20020999 4.0
> 38 20021000 2.5
> 43 20021001 3.5
> 46 20021002 3.5
> 52 20021003 4.0
> 53 20021004 5.0
>
> (I have more animals in the pedigree than I have phenotypes for)
>
>
>> m3 <- MCMCglmm(pp9$PP ~ 1, random=~animal, family="gaussian",
> pedigree=ped, data=pp9, nitt=100000, burnin=10000, thin=10)
> Error in `[<-.data.frame`(`*tmp*`, , response.names, value = c(4, 2.5,  :
>   missing values are not allowed in subscripted assignments of data frames
>
>
> Which data.frame subscripts does this refer to? Am I neglecting to  
> set some parameter? I have removed all the NAs from the phenotype  
> data.frame. I ran MCMCglmm with very small trial data, so I think  
> the problem is with my data but I can't find where.
>
>
>
>> sessionInfo()
> R version 2.15.1 (2012-06-22)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>  [7] LC_PAPER=C                 LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] MCMCglmm_2.17   corpcor_1.6.4   ape_3.0-7       coda_0.16-1
> [5] Matrix_1.0-10   lattice_0.20-13 tensorA_0.36
>
> loaded via a namespace (and not attached):
> [1] compiler_2.15.1 gee_4.13-18     grid_2.15.1     nlme_3.1-108
> [5] tools_2.15.1
>
>
> I'd appreciate any suggestions,
> Liz
>
>
> -- 
> Liz Hare PhD
> Dog Genetics LLC
> doggene at earthlink.net
> http://www.doggenetics.com
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>



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



More information about the R-sig-mixed-models mailing list