rpt: Repeatability Calculation for Gaussian and Non-Gaussian Data

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

A wrapper function for repeatability calculations. Calls specialised functions depending of the choice of datatype and method.

Usage

1
2
3
4
5
rpt (y, groups,
	datatype=c("Gaussian", "binomial", "proportion", "count"),  
	method=c("corr", "ANOVA", "REML", "MCMC", "GLMM.add", "GLMM.multi"),  
	link=c("logit", "probit", "log", "sqrt"),
	CI=0.95, nboot=1000, npermut=1000) 

Arguments

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.

Details

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).

Value

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.

Author(s)

Holger Schielzeth ([email protected]) & Shinichi Nakagawa ([email protected])

References

Nakagawa, S. and Schielzeth, H. (2011) Repeatability for Gaussian and non-Gaussian data: a practical guide for biologists. Biological Reviews 85: 935-956.

See Also

rpt.adj, rpt.corr, rpt.aov, rpt.remlLMM, rpt.mcmcLMM, rpt.binomGLMM.add, rpt.binomGLMM.multi, rpt.poisGLMM.add, rpt.poisGLMM.multi

Examples

 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)

rptR documentation built on May 2, 2019, 5:01 p.m.