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

Regression models are fit responses that are ordered factors with (or without) random effects.

1 |

`formula` |
a formula object that may include random effect terms using the format of |

`data` |
a data frame that includes the terms of the formula object as columns. |

`lnk` |
character specifying a link function, default ‘logit’.) |

`which.lme4` |
character indicating which version of lme4 to use. |

`...` |
additional named arguments passed along to |

This function is a wrapper that calls `glmer`

from the lme4 package if any random effect terms appear in the formula or `glm`

, if not. The response term should be of class ‘integer’, as the function will coerce it to ‘ordered’.
In the formula object, the random effect should be specified as the second level of random effect with
the intercept removed. See the example below. This is a glitch for the moment.

An object of class `mer`

or `glm`

depending on whether or not any random effect terms are included in the formula object.

Kenneth Knoblauch

1 2 3 4 5 6 7 8 9 10 | ```
data(Faces)
if(require(lme4.0, quietly = TRUE)){
# no random effects specified - calls glm
Faces.glm <- polmer(SimRating ~ sibs, Faces)
# random effect of observer - call glmer
# GLITCH: must specify random effect as second level of factor (levels of sibs are 0/1)
Faces.glmer <- polmer(SimRating ~ sibs + (sibs1 - 1 | Obs),
Faces)
}
``` |

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.