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))kfit2kfit2$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]]
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]]
Reasonably Related Threads
- no solution yet, please help: extract p-value from mixed model in kinship package
- How to extract p value from the lmekin object obtained by fitting mixed model with function lmekin() in package coxme?
- extract p-value from mixed model in kinship package
- Strange error
- New version of coxme / lmekin