Last data update: 2014.03.03

R: Summary table for a linear model
summarylmR Documentation

Summary table for a linear model

Description

Computes the coefficients, std. errors, t values, and p-values for a linear model in the presence of possible heteroskedasticity.

Usage

summarylm(object,correlation=FALSE,symbolic.cor = FALSE,white.adjust=FALSE,...)

Arguments

object

an object of class lm.

correlation

a logical value indicating whether parameter correlations should be printed.

symbolic.cor

logical. If TRUE, print the correlations in a symbolic form (see symnum) rather than as numbers. Effective only if white.adjust is FALSE.

white.adjust

value passed to hccm indicating the type of robust adjustment to be used. If TRUE, type is assumed to be 'hc3'

...

additional parameters passed to stats::summary.lm

Details

If white.adjust is false, the function returns a value identical to stats::summary.lm. Otherwise, robust summaries are computed

Value

A summary table

Examples

ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group <- gl(2,10,20, labels=c("Ctl","Trt"))
weight <- c((ctl-mean(ctl))*10+mean(ctl), trt)
lm.D9 <- lm(weight ~ group)
summarylm(lm.D9,white.adjust=TRUE)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Deducer)
Loading required package: ggplot2
Loading required package: JGR
Loading required package: rJava
Loading required package: JavaGD
Loading required package: iplots

Please type JGR() to launch console. Platform specific launchers (.exe and .app) can also be obtained at http://www.rforge.net/JGR/files/.


Loading required package: car
Loading required package: MASS


Note Non-JGR console detected:
	Deducer is best used from within JGR (http://jgr.markushelbig.org/).
	To Bring up GUI dialogs, type deducer().

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Deducer/summarylm.Rd_%03d_medium.png", width=480, height=480)
> ### Name: summarylm
> ### Title: Summary table for a linear model
> ### Aliases: summarylm
> 
> ### ** Examples
> 
> ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
> trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
> group <- gl(2,10,20, labels=c("Ctl","Trt"))
> weight <- c((ctl-mean(ctl))*10+mean(ctl), trt)
> lm.D9 <- lm(weight ~ group)
> summarylm(lm.D9,white.adjust=TRUE)
$`Summary Table`
            Estimate Std..Error    t.value    p.value
(Intercept)    5.032   1.943638  2.5889596 0.01852413
groupTrt      -0.371   1.961561 -0.1891351 0.85210317

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>