Imprecision {MultiRR} | R Documentation |
Calculates imprecision for n multi-level random regressions perfromed to n simulated dats sets.
Description
Calculates imprecision for an object created with anal.MultiRR.
Usage
Imprecision(x)
Arguments
x |
Object created with Anal.MultiRR. |
Value
A list of data frames with the imprecision for all the estimated variance components and repeatabilities.
Author(s)
Yimen Araya
References
Araya-Ajoy Y.G., Mathot, K. J., Dingemanse N. J. (2015) An approach to estimate short-term, long-term, and reaction norm repeatability. Methods in Ecology and Evolution.
See Also
Examples
#Example 1: Balanced sampling design.
#Define sample sizes.
n.ind <-c(40, 50) ##Numbers of individuals to simulate.
SeriesPerInd <- c(4, 5) ##Number of series per individual to simulate.
ObsPerLevel <- 2 ##Number of observations per level in the environmental gradient.
#Number of simulated data sets, use at least 10.
n.sim=3
#Define the environmetal gradient.
EnvGradient <- c(-0.5, 0.5)
#Define the population level parameters.
PopInt <- 0 ##Population level intercept.
PopSlope <- -0.5 ##Population level slope.
#Define individual level parameters
VCVInd <-matrix(c(0.3, 0.15, 0.15, 0.3),2,2) ##Creates a variance-covariance matrix.
#Define series level parameters
VCVSeries <-matrix(c(0.3, 0.15, 0.15, 0.3),2,2) ##Creates a variance-covariance matrix.
#Define the residual variance.
ResVar <- 0.4
#Simulate the data sets.
sim.data <- Sim.MultiRR(n.ind=n.ind, SeriesPerInd=SeriesPerInd,
ObsPerLevel=ObsPerLevel, EnvGradient=EnvGradient, PopInt=PopInt, PopSlope=PopSlope,
VCVInd=VCVInd, VCVSeries=VCVSeries, ResVar=ResVar, n.sim=3)
#Analyze the simulated data sets. This may take a while.
ressim <- Anal.MultiRR(sim.data)
#Summarize the results of the multi-level random regressions.
Summary(ressim)
#Estimate bias.
Bias(ressim)
#Estiamte imprecision.
Imprecision(ressim)
#Estimate power.
Power(ressim)
[Package MultiRR version 1.1 Index]