[R] Different lm() Residuals Output

Bert Gunter gunter.berton at gene.com
Mon Jan 9 18:47:58 CET 2012


It's the print method that determines this.

See
stats:::print.summary.lm

and in particular the if clause beginning:

    if (rdf > 5L) {

R code is open source. Once you know what to look for, you can examine
it yourself.

-- Bert


On Mon, Jan 9, 2012 at 9:25 AM, Rich Shepard <rshepard at appl-ecosys.com> wrote:
>  All but one of the summaries of multiple linear regressions in this
> analysis set present the residuals by min, 1Q, median, 3Q, and max. Example:
>
> lm(formula = TDS ~ Cond + Ca + Cl + Mg + Na + SO4, data = snow.cast)
> Residuals:
>     Min       1Q   Median       3Q      Max -277.351  -32.551   -2.621
> 40.812  245.272
>
> The one that doesn't has only a small number of rows (23) and presents the
> results as:
>
> lm(formula = TDS ~ Cond + Ca + Cl + Mg + SO4, data = rnchH.cast)
> Residuals:
>      8       9      10      11      12      13      14      16      20  21
> -2.1926  3.2306 -3.9823 -4.0491  0.5284  1.9354  2.4798  0.8952 -3.0642
>  0.8781
>     22
>  3.3408
>
>  What might cause this difference?
>
> Rich
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm



More information about the R-help mailing list