Fit a generalized linear mixed-effects model (GLMM) with binary Randomized Response data.
Both fixed effects and random effects are specified via the model formula.
Randomize response parameters can be entered either as single values or as vectors.
Implemented as a wrapper for `glmer`

. Reference: Fox, J-P, Klotzke, K. and Veen, D. (2016).
*Generalized Linear Mixed Models for Randomized Responses.* Manuscript submitted for publication.

1 2 |

`formula` |
a two-sided linear formula object describing both the fixed-effects and fixed-effects part of the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right. Random-effects terms are distinguished by vertical bars ("|") separating expressions for design matrices from grouping factors. |

`item` |
optional item identifier for long-format data. |

`link` |
a glm link function for binary outcomes. Must be a function name. Available options: "RRlink.logit", "RRlink.probit", "RRlink.cloglog" and "RRlink.cauchit" |

`RRmodel` |
the Randomized Response model, defined per case. Available options: "DQ", "Warner", "Forced", "UQM", "Crosswise", "Triangular" and "Kuk" |

`p1` |
the Randomized Response parameter p1, defined per case. Must be 0 <= p1 <= 1. |

`p2` |
the Randomized Response parameter p2, defined per case. Must be 0 <= p2 <= 1. |

`data` |
a data frame containing the variables named in |

`control` |
a list (of correct class, resulting from |

`na.action` |
a function that indicates what should happen when the data contain NAs.
The default action ( |

`...` |
other potential arguments to be passed to |

An object of class RRglmerMod. Extends the class `glmerMod`

with Randomize Response data,
for which many methods are available (e.g. `methods(class="glmerMod")`

).

`lme4`

1 2 3 4 5 6 7 8 9 | ```
# Fit the model with fixed effects for gender, RR and pp
# and a random effect for age using the logit link function.
# The Randomized Response parameters p1, p2 and model
# are specified for each observation in the dataset.
out <- RRglmer(response ~ Gender + RR + pp + (1|age), link="RRlink.logit", RRmodel=RRmodel,
p1=RRp1, p2=RRp2, data=Plagiarism, na.action = "na.omit",
etastart = rep(0.01, nrow(Plagiarism)),
control = glmerControl(optimizer = "Nelder_Mead", tolPwrss = 1e-03), nAGQ = 1)
summary(out)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.