Description Usage Arguments Details Value Author(s) References Examples

Compute upper- and lower-bound *p*-values for the analysis of variance (or deviance) as well as the amount of deviance explained (%) for each fixed-effect of an LMER model. Note that for `glmer`

models, there is no deviance explained column.

1 | ```
pamer.fnc(model, ndigits = 4)
``` |

`model` |
A |

`ndigits` |
Integer indicating the number of decimal places to be used in the ANOVA table. |

Upper-bound *p*-values are computed by using as denominator *df* `nrow(model@frame) - qr(model@X)4rank`

(i.e., number of data points minus number of fixed effects including the intercept), which are anti-conservative. Lower-bound *p*-values are computed by using as denominator *df* `nrow(model@frame) - qr(model@X)4rank - number of random effects`

(e.g., if by-subject intercepts and slopes, and there are 10 subjects, `10 * 2 = 20`

). The amount of deviance explained by each model term (i.e., eta squared) is calculated as `[Sum of Squares for the effect] / [Sum of Squares total]`

. More specifically: `as.data.frame(anova(model))[,2] / sum((model@frame[, dv]-mean(model@frame[, dv]))^2)`

where `dv`

is a vector of the names of the independent variables in the model.

This function returns an object of class `data frame`

with upper- and lower-bound (anti-conservative and conservative, respectively) *df*s, *p*-values, and deviance explained (%) for each model term. Note that for `glmer`

models, there is no deviance explained column.

Antoine Tremblay, Statistics Canada, trea26@gmail.com

`[R] lmer, p-values and all that`

available at https://stat.ethz.ch/pipermail/r-help/2006-May/094765.html.

1 | ```
# see example LMERConvenienceFunctions help page.
``` |

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.