The function generates increasing amount of errors to the pedigree structure and calculates heritability for each simulation. For each level of the error proportion, a number of simulation equal to B are repeated. Errors are generated within the first ntop generations of pedigree by eliminating fathers.
simul.na.top.herit(pedigree,pedigree0, lambda, B,
data, model, ntop, prior, nitt,thin,burnin)
A dataset containing the initial pedigree structure. It must have three columns: id, parent1, parent2.
A dataset containing the initial pedigree structure.
A vector of real numbers specifying the error proportion to be generated.
An integer specifying the number of simulations to be run for each error level.
A dataset containing the phenotypic measurements on the population and the covariates which are included in the model. The trait shoul be named differently than 'trait' (see MCMCglmm)
A object of class MCMCglmm used to calculate heritability.
An integer specifying the number of the first generations where to generate errors.
Prior distribution for MCMCglmm model
Number of iterations for MCMCglmm model
Thinning interval for MCMCglmm model
Burn in period for MCMCglmm model
A list:
A dataset containing all the simulated values for heritability
A dataset containing all the simulated standard errors for heritability
A dataset containing all the simulated values for additive variance
A dataset containing all the simulated values for environmental variance