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

View source: R/rpt.binomGLMM.add.R

Calculates repeatability from a generalised linear mixed-effects models fitted by MCMC for binary and proportion data

1 | ```
rpt.binomGLMM.add(y, groups, CI=0.95, prior=NULL, verbose=FALSE, ...)
``` |

`y` |
Vector of a response values (for binary data) or a two-column matrix, array or data.frame with colums |

`groups` |
Vector of group identities. |

`CI` |
Width of the Bayesian credible interval (defaults to 0.95) |

`prior` |
List of prior values passed to the MCMCglmm function in MCMCglmm (see there for more details). Default priors will be used if prior is |

`verbose` |
Whether or not MCMCglmm should print MH diagnostics are printed to screen. Defaults to FALSE. |

`...` |
Additonal arguements that are passed on to MCMCglmm (e.g. length of chain, thinning interval). |

Models are fitted using the MCMCglmm function in MCMCglmm. The categorical family is used for binary data, while the multinomial2 is used for proportion data.
Models for binary data are fitted with `list(R=list(V=1,fix=1),G=list(G1=list(V=1,nu=1,alpha.mu=0,alpha.V=25^2)))`

unless other priors are specified in the call.
Models for proportion data are fitted with `list(R=list(V=1e-10,nu=-1),G=list(G1=list(V=1,nu=1,alpha.mu=0,alpha.V=25^2)))`

unless other priors are specified in the call.

Returns an object of class rpt that is a a list with the following elements:

`datatype` |
Type of response (here: "binomial"). |

`method` |
Method used to calculate repeatability (here: "MCMC"). |

`CI` |
Width of the Bayesian credibility interval. |

`R.link` |
Point estimate for repeatability on the link scale, i.e. the mode of the posterior distribution. |

`se.link` |
Standard error ( |

`CI.link` |
Bayesian credibility interval for the intraclass correlation (or repeatability) on the link scale based on the posterior distribution of |

`P.link` |
Significance test for the link scale repeatability, returned as |

`R.org` |
Point estimate for repeatability on the original scale, i.e. the mode of the posterior distribution. |

`se.org` |
Standard error ( |

`CI.org` |
Bayesian credibility interval for repeatability on the original scale based on the posterior distribution of |

`P.org` |
Significance test for the original scale repeatability, returned as |

`R.post` |
Named list of MCMC samples form the posterior distributions. |

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

Browne, W. J., Subramanian, S. V., et al. (2005). *Variance partitioning in multilevel logistic models that exhibit overdispersion*. Journal of the Royal Statistical Society A 168: 599-613.

Goldstein, H., Browne, W., et al. (2002). *Partitioning variation in multilevel models*. Understanding Statistics 1: 223-231.

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

rpt.binomGLMM.multi, rpt, print.rpt

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
# repeatability estimations for egg dumping (binary data)
data(BroodParasitism)
attach(BroodParasitism)
(rpt.Host <- rpt.binomGLMM.add(HostYN[OwnClutchesBothSeasons==1], FemaleID[OwnClutchesBothSeasons==1]))
(rpt.BroodPar <- rpt.binomGLMM.add(cbpYN, FemaleID))
detach(BroodParasitism)
# repeatability estimations for egg dumping (proportion data)
data(BroodParasitism)
attach(BroodParasitism)
ParasitisedOR <- cbind(HostClutches, OwnClutches-HostClutches)
(rpt.Host <- rpt.binomGLMM.add(ParasitisedOR[OwnClutchesBothSeasons==1,],
FemaleID[OwnClutchesBothSeasons==1]))
ParasitismOR <- cbind(cbpEggs, nEggs-cbpEggs)
(rpt.BroodPar <- rpt.binomGLMM.add(ParasitismOR, FemaleID))
detach(BroodParasitism)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.