Re: [R] lm question

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [R] lm question
From: Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
Date: Mon 09 Oct 2000 - 21:39:46 EST


Message-ID: <x2itr25jlp.fsf@blueberry.kubism.ku.dk>

Martyn Plummer <plummer@iarc.fr> writes:

> Is that really necessary?
>
> R> lm(y ~ grp:x, data=foo)
>
> Call:
> lm(formula = y ~ grp:x, data = foo)
>
> Coefficients:
> (Intercept) grpa.x grpb.x grpc.x
> -0.80977 0.01847 0.13124 0.14259

Surprise, surprise. You're right, obviously. I could have sworn that
would get you in trouble with the contrasts coding. Not my day today
apparently...

(I can't even pretend I mixed up R and S:

> lm(y ~ grp:x)
Call:
lm(formula = y ~ grp:x)

Coefficients:
 (Intercept) grpax grpbx grpcx
  -0.8097666 0.01847139 0.1312409 0.1425913

)

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Thu 01 Feb 2001 - 16:14:27 EST