Description Usage Arguments Details Value Author(s) References See Also Examples
A wrapper function for repeatability calculations. Calls specialised functions depending of the choice of datatype and method.
1 2 3 4 5 |
y |
Vector of measurements (or two-column matrix or dataframe in case of proprotion data, see rpt.binomGLMM.add and rpt.binomGLMM.multi for details. |
groups |
Vector of group identitities (will be converted to a factor). |
datatype |
Character string specifying the data type ("Gaussian", "binomial", "proportion", "count"). "binomial" and "proportion" are interchangable and call the same functions. |
method |
character string specifying the method of calculation. Defaults to "REML" for Gaussian data and to "GLMM.multi" for binomial and count data. |
link |
Character string specifying the link function. Ignored for "Gaussian" datatype and for the "GLMM.add" method. |
CI |
Width of the confidence interval between 0 and 1 (defaults to 0.95). |
nboot |
Number of bootstrapping runs used when calculating the asymtotic confidence interval (defaults to 1000). Ignored for the "GLMM.add", "corr" and "ANOVA" methods. |
npermut |
Number of permutations used when calculating asymtotic P values (defaults to 1000). Ignored for the "GLMM.add" method. |
For datatype="Gaussian"
calls function rpt.corr, rpt.aov, rpt.remlLMM or rpt.mcmcLMM (methods "corr", "ANOVA", "REML" and "MCMC", respecitvely).
For datatype="binomial"
or datatype="proportion"
calls function rpt.binomGLMM.multi or rpt.binomGLMM.add (methods "GLMM.multi" and "GLMM.add", respectively).
For datatype="count"
calls function rpt.poisGLMM.multi or rpt.poisGLMM.add (methods "GLMM.multi" and "GLMM.add", respectively).
Returns an object of class rpt. See details for specific functions.
datatype |
Type of repsonse ("Gaussian", "binomial" or "count"). |
method |
Method used to calculate repeatability ("REML", "MCMC", "ANOVA", "corr", "GLMM.add" or "GLMM.multi"). |
link |
Link functions used (GLMMs only). |
CI |
Width of the confidence interval or Bayesian credibility interval. |
R |
Point estimate for repeatability. |
R.link |
Point estimate for repeatability on link scale (GLMM only). |
R.org |
Point estimate for repeatability on original scale (GLMM only). |
se |
Standard error (se) for repeatability. Note that the distribution might not be symmetrical, in which case the se is less informative. |
se.link |
Standard error (se) for repeatability on link scale (GLMM only). |
se.org |
Standard error (se) for repeatability on original scale (GLMM only). |
CI.R |
Confidence interval or Bayesian credibility interval for the repeatability. |
CI.link |
Confidence interval or Bayesian credibility interval for repeatability on link scale (GLMM only). |
CI.org |
Confidence interval or Bayesian credibility interval for repeatability on original scale (GLMM only). |
P |
Significace test, returned as NA for the Bayesian approach conflicts with the null hypothesis testing. |
P.link |
Significace test for repeatability on link scale, returned as NA for the Bayesian approach conflicts with the null hypothesis testing. |
P.org |
Significace test for repeatability on original scale, returned as NA for the Bayesian approach conflicts with the null hypothesis testing. |
R.post |
MCMC samples form the posterior distributions of R. |
R.boot |
Parametric bootstrap samples for R. |
R.permut |
Permutation samples for R. |
Holger Schielzeth (holger.schielzeth@ebc.uu.se) & Shinichi Nakagawa (shinichi.nakagawa@otago.ac.nz)
Nakagawa, S. and Schielzeth, H. (2011) Repeatability for Gaussian and non-Gaussian data: a practical guide for biologists. Biological Reviews 85: 935-956.
rpt.adj, rpt.corr, rpt.aov, rpt.remlLMM, rpt.mcmcLMM, rpt.binomGLMM.add, rpt.binomGLMM.multi, rpt.poisGLMM.add, rpt.poisGLMM.multi
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ## Not run:
# all examples use a reduced number of npermut and nboot iterations!
# for Gaussian data - correlation-based repeatability
# repeatability for male breeding success on a transformed scale
data(Fledglings)
Fledglings$sqrtFledge <- sqrt(Fledglings$Fledge)
attach(Fledglings)
(rpt.Fledge <- rpt(sqrtFledge, MaleID, datatype="Gaussian", method="corr", nboot=10, npermut=10))
detach(Fledglings)
# for Gaussian data - ANOVA-based and two LMM-based repeatabilities
# repeatability estimation for weight (body mass)
data(BodySize)
attach(BodySize)
(rpt.Weight <- rpt(Weight, BirdID, datatype="Gaussian", method="ANOVA", npermut=10))
(rpt.Weight <- rpt(Weight, BirdID, datatype="Gaussian", method="REML", nboot=10, npermut=10))
# reduced number of nboot and npermut iterations
(rpt.Weight <- rpt(Weight, BirdID, datatype="Gaussian", method="MCMC"))
detach(BodySize)
# for Binary data - additive and multiplicative overdispersion models
# repeatability estimations for egg dumping (binary data)
data(BroodParasitism)
attach(BroodParasitism)
(rpt.BroodPar <- rpt(cbpYN, FemaleID, datatype="binomial", method="GLMM.multi", link="logit",
nboot=10, npermut=10))
(rpt.BroodPar <- rpt(cbpYN, FemaleID, datatype="binomial", method="GLMM.multi", link="probit",
nboot=10, npermut=10))
(rpt.BroodPar <- rpt(cbpYN, FemaleID, datatype="binomial", method="GLMM.add"))
detach(BroodParasitism)
# for proportion data - additive and multiplicative overdispersion models
# repeatability estimations for egg dumping (proportion data)
data(BroodParasitism)
attach(BroodParasitism)
ParasitisedOR <- cbind(HostClutches, OwnClutches-HostClutches)
(rpt.Host <- rpt(ParasitisedOR[OwnClutchesBothSeasons==1,], FemaleID[OwnClutchesBothSeasons==1],
datatype="proportion", method="GLMM.multi", nboot=10, npermut=10))
(rpt.Host <- rpt(ParasitisedOR[OwnClutchesBothSeasons==1,], FemaleID[OwnClutchesBothSeasons==1],
datatype="proportion", method="GLMM.add"))
detach(BroodParasitism)
# for count data - additive and multiplicative overdispersion models
# repeatability for male fledgling success
data(Fledglings)
attach(Fledglings)
(rpt.Fledge <- rpt(Fledge, MaleID, datatype="count", method="GLMM.multi", nboot=10, npermut=10))
(rpt.Fledge <- rpt(Fledge, MaleID, datatype="count", method="GLMM.add"))
detach(Fledglings)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.