Re: [R] Inconsistent linear model calculations

From: e-letter <>
Date: Thu, 15 May 2008 20:23:56 +0100

On 15/05/2008, Michael Kubovy <> wrote:
> Hi,
> Your reply doesn't help you with your lm() problem. You need to show the
> problem with lm() as well. Your original message was unclear on what is
> wrong.

The problem I have with lm() is that when I enter this command, I obtain different answers!
> So here is a todo list, before you do anything else:
> (1) Get the most recent version of R (2.7.0).

No thank you. I rely on my urpmi repository.
> (2) Make sure you issue the command update.packages() at least once a week

You must be joking! Waste my time every week to perform a basic task such as interpolation, or least fit squares linear regression? I am a novice seeking only to perform rudimentary statistics.
> (3) Find a textbook example of a linear model. Run it using lm().
> (a) If it comes out right, then nothing is wrong with the function, and
> you've been confused somewhere else.

Well, I sought a statistician who showed me how to do this task using mathematica. Despite advice otherwise, I am interested to learn how to perform this basic task using r because it's free and and use linux. The output from the lm() command using version 171 yielded the same result as obtained from the statistician who helped me. In contrast enabling the version 251 did not yield the same result, hence this original post.
> (b) If it comes out wrong, read the help page for lm(), get a textbook or
> read some of the introductory materials on CRAN. lm() is never wrong (this
> is not necessarily true for all R functions, but it's true for most).
> (4) Before you ask the list for help, read
> carefully, and
> follow the rules religiously.

Done, but not religiously. ;)
> (5) Generally do not reply to the person who helped you, but to the list.
> You can cc the person who helped you, but that is rarely appropriate (avoid
> cluttering people's mailboxes).
> (6) Do *not* be rude (as in your recent message). You will be shunned.
> Ripley and Bates are two of the most distinguished statisticians alive.
> Accept their criticism gracefully.

Telling a user the software version is nonexistent is equally rude; I've little respect for such typical techie petulance.
> (7) Your most recent message doesn't help enough. Write it so that if I copy
> and paste your code into R, I can reproduce the result you're worried about.

I didn't know you can copy data directly into r; why not simply copy the text to your text editor and save in csv format?

Yours, mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Fri 16 May 2008 - 13:39:40 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 Fri 16 May 2008 - 14:30:42 GMT.

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

list of date sections of archive