Re: [R] Inconsistent linear model calculations

From: Michael Kubovy <>
Date: Thu, 15 May 2008 09:41:23 -0400


To get help with this problem, you will have to create an example that others can duplicate. That is why each message to the list says (at the bottom): "PLEASE do read the posting guide   and provide commented, minimal, self-contained, reproducible code."

Before you do any of that, please run some textbook examples using lm(), which will tell you whether lm() is working or not. It is ***extremely*** unlikely that for a function as stable and heavily- used as lm(), the same data and the same command produced different results on different computers, different versions of R, or different OSs.

Your list of packages installed is not informative, because these packages are unlikely to affect your running of lm(). To tell the list which version of R you are running please include the output of sessionInfo().

You will find that many people are eager to help beginners, as long as they give enough information about the problem they encountered.

Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:     P.O.Box 400400    Charlottesville, VA 22904-4400
Parcels:    Room 102        Gilmer Hall
         McCormick Road    Charlottesville, VA 22903
Office:    B011    +1-434-982-4729
Lab:        B019    +1-434-982-4751
Fax:        +1-434-982-4766


On May 15, 2008, at 8:05 AM, e-letter wrote:

> Readers,
> Using version 251 I tried the following command:
> lm(y~a+b,data=datafile)

> Resulting in, inter alia:
> ...
> coefficients
> (intercept) a
> 1.2 3.4
> Packages installed:
> <snip>
> Why do I get different results when entering the same equation
> command? The correct answer was obtained using the older version of
> the software, so I want to replicate using the new version, which is
> installed onto a new pc that I am using. Any advice.
> Yours,

        [[alternative HTML version deleted]] mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 15 May 2008 - 13:44:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 15 May 2008 - 14:30:38 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive