On Thu, May 15, 2008 at 3:05 PM, e-letter <[EMAIL PROTECTED]> wrote:

> 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
>
[...]

> When using version 171 I entered the same command:
>
> lm(y~a+b,data=datafile)
>
> Resulting in, inter alia:
> ...
> coefficients
> (intercept) a b
> 5.6 7.8 9.01
>


> 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.
>

First check if your data frame is the same on both occasions. (It definitely
wasn't the data set you provided in a later message - so it sounds possible
you've made another error.)

Secondly, try to make sure you're copying real output here. You should have
three coefficients if you ask for three.

Third, check your lm function:

"lm"%in%ls()

Maybe an evil twin of yours has modified it, for instance, this way:

lm<- function(...) cat("coefficients\
(intercept) \ta\
1.2 \t\t3.4\n")

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to