Learn R Programming

robustlmm (version 1.4-2)

compare: Create comparison charts for multiple fits

Description

Use compare to quickly compare the estaimated parameters of the fits of multiple lmerMod or rlmerMod objects.

The functions xtable.comparison.table and print.xtable.comparison.table are wrapper functions for the respective xtable and print.xtable functions.

The function getInfo is internally used to prepare object for producing a comparison chart in compare.

Usage

compare(..., digits = 3, dnames = NULL,
    show.rho.functions = TRUE)

## S3 method for class 'comparison.table': xtable(x, caption = NULL, label = NULL, align = NULL, digits = NULL, display = NULL, ...)

## S3 method for class 'xtable.comparison.table': print(x, add.hlines = TRUE, latexify.namescol = TRUE, include.rownames = FALSE, ...)

getInfo(object, ...)

## S3 method for class 'lmerMod': getInfo(object, ...)

## S3 method for class 'rlmerMod': getInfo(object, ...)

Arguments

...
objects to compare, or, for the xtable functions: passed to the respective xtable function.
digits
number of digits to show in output
dnames
names of objects given as arguments (optional)
show.rho.functions
whether to show rho functions in output.
x
object of class "comparison.table" or "xtable.comparison.table"
caption
see xtable.
label
see xtable.
align
see xtable.
display
see xtable.
add.hlines
replace empty lines in comparison table by hlines. Supersedes hline.after argument of print.xtable.
latexify.namescol
replace sigma and x in the first column by latex equivalents.
include.rownames
include row numbers (the object returned by xtable.comparison.table includes names in the first column)
object
object

Value

  • getInfo returns alist with estimated coefficients, estimated variance components, sigma, deviance and parameter configuration used to fit.

See Also

xtable

print.xtable

Examples

Run this code
fm1 <- lmer(Yield ~ (1|Batch), Dyestuff)
fm2 <- rlmer(Yield ~ (1|Batch), Dyestuff)
compare(fm1, fm2)
require(xtable)
xtable(compare(fm1, fm2))
str(getInfo(fm1))

Run the code above in your browser using DataLab