Description Usage Arguments Details Value Author(s) References See Also Examples
Estimates repeatability from a generalized linear mixedeffects models fitted by restricted maximum likelihood (REML).
1 2 3 4 
formula 
Formula as used e.g. by lmer. The grouping factor(s) of interest needs to be included as a random effect, e.g. '(1groups)'. Covariates and additional random effects can be included to estimate adjusted repeatabilities. 
grname 
A character string or vector of character strings giving the
name(s) of the grouping factor(s), for which the repeatability should
be estimated. Spelling needs to match the random effect names as given in 
data 
A dataframe that contains the variables included in the 
link 
Link function. 
CI 
Width of the required confidence interval between 0 and 1 (defaults to 0.95). 
nboot 
Number of parametric bootstraps for interval estimation
(defaults to 1000). Larger numbers of bootstraps give a better
asymtotic CI, but may be timeconsuming. Bootstrapping can be switch off by setting

npermut 
Number of permutations used when calculating asymptotic pvalues
(defaults to 0). Larger numbers of permutations give a better
asymtotic pvalues, but may be timeconsuming (in particular when multiple grouping factors
are specified). Permutaton tests can be switch off by setting 
parallel 
Boolean to express if parallel computing should be applied (defaults to FALSE). If TRUE, bootstraps and permutations will be distributed across multiple cores. 
ncores 
Specifying the number of cores to use for parallelization. On default, all but one of the available cores are used. 
ratio 
Boolean to express if variances or ratios of variance should be estimated. If FALSE, the variance(s) are returned without forming ratios. If TRUE (the default) ratios of variances (i.e. repeatabilities) are estimated. 
adjusted 
Boolean to express if adjusted or unadjusted repeatabilities should be estimated. If TRUE (the default), the variances explained by fixed effects (if any) will not be part of the denominator, i.e. repeatabilities are calculated after controlling for variation due to covariates. If FALSE, the varianced explained by fixed effects (if any) will be added to the denominator. 
expect 
A character string specifying the method for estimating the expectation in Poisson models with log link and in Binomial models with logit link (in all other cases the agrument is ignored). The only valid terms are 'meanobs' and 'latent' (and 'liability for binary and proportion data). With the default 'meanobs', the expectation is estimated as the mean of the observations in the sample. With 'latent', the expectation is estimated from estiamtes of the intercept and variances on the link scale. While this is a preferred solution, it is susceptible to the distribution of fixed effect covariates and gives appropriate results typically only when all covariances are centered to zero. With 'liability' estimates follow formulae as presented in Nakagawa & Schielzeth (2010). Liability estimates tend to be slightly higher. 
rptObj 
The output of a rptR function. Can be specified in combination with update = TRUE to update bootstraps and permutations 
update 
If TRUE, the rpt object to be updated has to be inputted with the rptObj argument. The function just updates the permutations and bootstraps, so make sure to specify all other arguments excactly like for the rpt object specified in rptObj. 
see details section of rpt
for details on parametric bootstrapping,
permutation and likelihoodratio tests.
Returns an object of class rpt
that is a a list with the following elements:
call 
Function call 
datatype 
Response distribution (here: 'Proportion'). 
CI 
Width of the confidence interval. 
R 

se 

CI_emp 

P 

R_boot_link 
Parametric bootstrap samples for R on the link scale. Each 
R_boot_org 
Parametric bootstrap samples for R on the original scale. Each 
R_permut_link 
Permutation samples for R on the link scale. Each 
R_permut_org 
Permutation samples for R on the original scale. Each 
LRT 
List of two elements. LRT_mod is the likelihood for the full model and (2) LRT_table is a data.frame for the reduced model(s) including columns for the likelihood logl_red, the likelihood ratio(s) LR_D, pvalue(s)LR_P and degrees of freedom for the likelihoodratio test(s) LR_df. 
ngroups 
Number of groups for each grouping level. 
nobs 
Number of observations. 
overdisp 
Overdispersion parameter. Equals the variance in the observational factor random effect 
mod 
Fitted model. 
ratio 
Boolean. TRUE, if ratios have been estimated, FALSE, if variances have been estimated 
adjusted 
Boolean. TRUE, if estimates are adjusted 
all_warnings 

Holger Schielzeth (holger.schielzeth@unijena.de), Shinichi Nakagawa (s.nakagawa@unsw.edu.au) & Martin Stoffel (martin.adam.stoffel@gmail.com)
Carrasco, J. L. & Jover, L. (2003) Estimating the generalized concordance correlation coefficient through variance components. Biometrics 59: 849858.
Faraway, J. J. (2006) Extending the linear model with R. Boca Raton, FL, Chapman & Hall/CRC.
Nakagawa, S. & Schielzeth, H. (2010) Repeatability for Gaussian and nonGaussian data: a practical guide for biologists. Biological Reviews 85: 935956
rpt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  data(BeetlesMale)
# prepare proportion data
BeetlesMale$Dark < BeetlesMale$Colour
BeetlesMale$Reddish < (BeetlesMale$Colour1)*1
BeetlesColour < aggregate(cbind(Dark, Reddish) ~ Treatment + Population + Container,
data=BeetlesMale, FUN=sum)
# Note: nboot and npermut are set to 0 for speed reasons.
# repeatability with one grouping level
rptProportion(cbind(Dark, Reddish) ~ (1Population),
grname=c("Population"), data=BeetlesColour, nboot=3, npermut=3)
# unadjusted repeatabilities with fixed effects and
# estimation of the fixed effect variance
rptProportion(cbind(Dark, Reddish) ~ Treatment + (1Container) + (1Population),
grname=c("Population", "Fixed"),
data=BeetlesColour, nboot=0, npermut=0, adjusted=FALSE)
# variance estimation of random effects, residual and overdispersion
rptProportion(cbind(Dark, Reddish) ~ Treatment + (1Container) + (1Population),
grname=c("Container","Population","Residual", "Overdispersion"),
data = BeetlesColour, nboot=0, npermut=0, ratio = FALSE)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.