compare: Create comparison charts for multiple fits

View source: R/helpers.R

compareR Documentation

Create comparison charts for multiple fits

Description

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

Usage

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

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

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

## 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, ...)

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.

object

object

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)

Details

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.

Value

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

See Also

xtable

print.xtable

Examples

## Not run: 
  fm1 <- lmer(Yield ~ (1|Batch), Dyestuff)
  fm2 <- rlmer(Yield ~ (1|Batch), Dyestuff)
  compare(fm1, fm2)
  require(xtable)
  xtable(compare(fm1, fm2))
  str(getInfo(fm1))

## End(Not run)

robustlmm documentation built on Nov. 15, 2023, 1:07 a.m.