modelTable: Collect results for different regression models

Description Usage Arguments Value Author(s) See Also Examples

Description

modelTable produces a table that shows which variables are contained in various models. Typically, the different models are the results of various model selection functions and model development strategies.

format.modelTable and print.modelTable are used to turn the results into a nice form.

compareTerms returns a table indicating which terms appear in which models.

Usage

1
2
3
4
5
6
7
8
9
modelTable(models, seq = NULL) 

## S3 method for class 'modelTable'
format(x, digits=getUserOption("digits"),
       stars = c("***","** ","*  ",":  ",".  "), sep="", ...)
## S3 method for class 'modelTable'
print(x, tex = FALSE, transpose = FALSE, ...)

compareTerms(... , list=NULL, seq = NULL)

Arguments

models

a character vector containing the names of the models to be collected, or a list of model fits.

seq

The sequence in which the terms should appear in the table. If incomplete, the terms mentioned in seq will be the first rows in the result.

x

object of class modelTable

digits

to be used in formatting

stars

symbols used to indicate level of significance. They will be used for the intervals delimited by c(-1, 0.001, 0.01, 0.05, 0.1, 1)

sep

separator. "\&" is used to prepare LaTeX format.

tex

if TRUE, the output can be used in (La-)TeX.

transpose

logical. If TRUE, the table is printed in transposed form

...

other arguments, passed to print or format.
In compareTerms, the models for which the terms should be compared can be listed as in c or list etc.

list

A list of models.

Value

modelTable produces a list of class "modelTable", with components

coef

the coefficients of the models, collected in a matrix. The columns of the matrix correspond to the models, the rows, to the terms. For terms with more than 1 degree of freedom, the matrix element is NA. If possible, standardized coefficients are given.

p

p values, in the same form

sigma

estimated error standard deviations of the models

fitfun

fitting functions used for fitting the models

format.modelTable returns a character matrix and thereby prepares for print.modelTable. If needed, the ouput of format.modelTable can be reordered or subsetted.

Author(s)

Werner A. Stahel, ETH Zurich

See Also

on formatting and printing of P-values, the standard R functions symnum, format.pval.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(d.blast)
r.blast <-
  regr(log10(tremor)~location+log10(distance)+log10(charge), data=d.blast)
r.bl2 <- update(r.blast, ~.+location:log10(distance)+I(log10(charge)^2) )
r.mt <- modelTable(list(large=r.bl2, original=r.blast))
r.mt

format(r.mt)
print(r.mt, tex=TRUE)
compareTerms(r.blast, r.bl2, seq=c("log10(distance)", "log10(charge)"))

regr0 documentation built on May 2, 2019, 4:52 p.m.

Related to modelTable in regr0...