rpt.adj: (Adjusted) Repeatability Calculation for Gaussian and...

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

View source: R/rpt.adj.R

Description

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

Usage

1
2
3
4
5
rpt.adj (formula, grname, data,
	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

formula

Formula as used e.g. by lmer. The grouping factor of interest needs to be included as a random effect, e.g. '(1|groups)'. 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 fromula.

data

A dataframe that contains the variables included in the formula argument.

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.remlLMM.adj or rpt.mcmcLMM.adj (methods "REML" and "MCMC", respecitvely) (Note that rpt.mcmcLMM.adj is not yet implemented).

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

Examples

1
2
3
4
5
6
7
8
9
# for Gaussian data - correlation-based repeatability
# repeatability for male breeding success on a transformed scale
data(Fledglings)
Fledglings$sqrtFledge <- sqrt(Fledglings$Fledge)
(rpt.Fledge <- rpt.adj(sqrtFledge ~ Age + (1|MaleID), "MaleID", data=Fledglings, datatype="Gaussian", 
	method="REML", nboot=10, npermut=10))   # reduced number of nboot and npermut iterations
# data(BodySize)
# (rpt.Weight <- rpt.adj(Weight ~ Sex + (1|BirdID), "BirdID", data=BodySize, datatype="Gaussian", 
#	method="MCMC"))

rptR documentation built on May 31, 2017, 2:53 a.m.