glmmadmb_tidiers | R Documentation |

These methods tidy the coefficients of `glmmADMB`

models

## S3 method for class 'glmmadmb' tidy( x, effects = c("fixed", "ran_pars"), component = "cond", scales = NULL, ran_prefix = NULL, conf.int = FALSE, conf.level = 0.95, conf.method = "Wald", ... ) ## S3 method for class 'glmmadmb' augment(x, data = stats::model.frame(x), newdata, ...) ## S3 method for class 'glmmadmb' glance(x, ...)

`x` |
An object of class |

`effects` |
A character vector including one or more of "fixed" (fixed-effect parameters), "ran_pars" (variances and covariances or standard deviations and correlations of random effect terms) or "ran_vals" (conditional modes/BLUPs/latent variable estimates) |

`component` |
Which component(s) to report for (e.g., conditional, zero-inflation, dispersion: at present only works for "cond") |

`scales` |
scales on which to report the variables: for random effects, the choices are ‘"sdcor"’ (standard deviations and correlations: the default if |

`ran_prefix` |
a length-2 character vector specifying the strings to use as prefixes for self- (variance/standard deviation) and cross- (covariance/correlation) random effects terms |

`conf.int` |
whether to include a confidence interval |

`conf.level` |
confidence level for CI |

`conf.method` |
method for computing confidence intervals (see |

`...` |
extra arguments (not used) |

`data` |
original data this was fitted on; if not given this will attempt to be reconstructed |

`newdata` |
new data to be used for prediction; optional |

When the modeling was performed with `na.action = "na.omit"`

(as is the typical default), rows with NA in the initial data are omitted
entirely from the augmented data frame. When the modeling was performed
with `na.action = "na.exclude"`

, one should provide the original data
as a second argument, at which point the augmented data will contain those
rows (typically with NAs in place of the new columns). If the original data
is not provided to `augment`

and `na.action = "na.exclude"`

, a
warning is raised and the incomplete rows are dropped.

All tidying methods return a `tbl_df`

without rownames.
The structure depends on the method chosen.

`tidy`

returns one row for each estimated effect, either
with groups depending on the `effects`

parameter.
It contains the columns

`group` |
the group within which the random effect is being estimated: |

`level` |
level within group ( |

`term` |
term being estimated |

`estimate` |
estimated coefficient |

`std.error` |
standard error |

`statistic` |
t- or Z-statistic ( |

`p.value` |
P-value computed from t-statistic (may be missing/NA) |

`augment`

returns one row for each original observation,
with columns (each prepended by a .) added. Included are the columns

`.fitted` |
predicted values |

`.resid` |
residuals |

`.fixed` |
predicted values with no random effects |

Also added for "merMod" objects, but not for "mer" objects,
are values from the response object within the model (of type
`lmResp`

, `glmResp`

, `nlsResp`

, etc). These include ```
".mu",
".offset", ".sqrtXwt", ".sqrtrwt", ".eta"
```

.

`glance`

returns one row with the columns

`sigma` |
the square root of the estimated residual variance |

`logLik` |
the data's log-likelihood under the model |

`AIC` |
the Akaike Information Criterion |

`BIC` |
the Bayesian Information Criterion |

`deviance` |
deviance |

na.action

if (require("glmmADMB") && require("lme4")) { ## original model ## Not run: data("sleepstudy", package="lme4") lmm1 <- glmmadmb(Reaction ~ Days + (Days | Subject), sleepstudy, family="gaussian") ## End(Not run) ## load stored object load(system.file("extdata","glmmADMB_example.rda",package="broom.mixed")) tidy(lmm1, effects = "fixed") tidy(lmm1, effects = "fixed", conf.int=TRUE) ## tidy(lmm1, effects = "fixed", conf.int=TRUE, conf.method="profile") ## tidy(lmm1, effects = "ran_vals", conf.int=TRUE) head(augment(lmm1, sleepstudy)) glance(lmm1) glmm1 <- glmmadmb(cbind(incidence, size - incidence) ~ period + (1 | herd), data = cbpp, family = "binomial") tidy(glmm1) tidy(glmm1, effects = "fixed") head(augment(glmm1, cbpp)) glance(glmm1) }

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.