Hi,I use the 'lmekin' model of the 'kinship' package of R in order to estimate heritability. I want to estimate the confidence interval of the variance coefficient and so I should use a bootstrap simulation. The pedigree file has 1386 subjects so I create a kinship matrix [1386*1386].This is the code of R I use:
kfit2 <- lmekin(IT~1+AGE +(1|ID), dati1, varlist=list(kmat)) kfit2$vcoef library(boot) var <- function(formula,data,indices,varlist) { d <- data[indices,] # allows boot to select sample kfit2 <- lmekin(formula, data=d, varlist=list(kmat)) return(kfit2$vcoef)} # bootstrapping with 1000 replications results <- boot(data=dati1, statistic=var, R=1000, formula=IT~1+AGE +(1|ID),varlist=list(kmat)) ## WARNING MESSAGE: wrong number of indices for a matrix What can I do with the kinship matrix?? Thanks for help!! Best regards Roberta [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.