[R] y-intercept forcing

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Fri Apr 19 17:11:24 CEST 2002


"Tristan Peery" <tristanpeery at hotmail.com> writes:

> R-gurus,
> 
> I am plotting data against each other using t-tests. 

Er? I don't think that means what you intended it to mean....

> In this
> scenario, I am plotting coinage / total money.  When there is no total
> money, then there is no coinage, but the plots I generate do not
> reflect this.  Instead the y-axis always has an intecept that is not
> zero in these instances.  Is there any way to force the y-intercept to
> begin at zero?  Thank you in advance for any input.

abline(lm(y~x-1)) plots a fitted regression line with no intercept.
(Or, y~x+0 does the same thing).

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at 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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list