[R] lm function - strange error

John Kane jrkrideau at inbox.com
Fri Nov 9 21:25:59 CET 2012


   Actually it was not tessa but the original document that was at fault.
   I suspect you may be right that the 0 should not be there but it was in the
   document.
   In any case look at these
   conc = c(10, 20, 30, 40, 50)
   signal = c (4, 22, 44, 60, 82)
   lm.r1  <-  lm( signal ~ conc)
   summary(lm.r)
   conc = c(0,10, 20, 30, 40, 50)
   signal = c (4, 22, 44, 60, 82, NA)
   lm.r  <-  lm( signal ~ conc)
   summary(lm.r)



   John Kane
   Kingston ON Canada

   -----Original Message-----
   From: askibeto at gmail.com
   Sent: Fri, 9 Nov 2012 20:35:05 +0100
   To: jrkrideau at inbox.com
   Subject: Re: [R] lm function - strange error

   Hi Tessa, I agree with John. I think you've made a typo, but looking at your
   data I think the zero concentration should not be there. Try plotting it.
   conc = c(10, 20, 30, 40, 50)
   signal = c (4, 22, 44, 60, 82)
   plot(signal~conc)
   abline(lm(signal~conc))
   2012/11/9 John Kane <[1]jrkrideau at inbox.com>

     Tessa,
     Would you please leave in the context --that is your early remarks and
     mine?
     Most of us on the R-help list do no use nabble and it is really annoying
     to have to go there to see what was discussed.  I suspect that a lot of
     readers just don't bother and nabble users lose a lot of possible help
     that way.
     In any case, I think your problem  is a typo in the document.
      My  first suggestion  gives  exactly the same results shown in the
     document you supplied.  Run this :
     conc = c(0, 10, 20, 30, 40, 50)
     signal = c (4, 22, 44, 60, 82, NA)
     lm.r  <-  lm( signal ~ conc)
     summary(lm.r)
     I hope this helps.

   John Kane
   Kingston ON Canada
   > -----Original Message-----
   > From: [2]tesarants at gmail.com

   > Sent: Fri, 9 Nov 2012 09:36:23 -0800 (PST)
   > To: [3]r-help at r-project.org

   > Subject: Re: [R] lm function - strange error
   >
   > Here is the document
   >
   >
   [4]http://www.montefiore.ulg.ac.be/~kvansteen/GBIO0009-1/ac20092010/Class8/U
   sing%20R%20for%20linear%20regression.pdf
   >

     ____________________________________________________________
     GET   FREE   SMILEYS   FOR   YOUR  IM  &  EMAIL  -  Learn  more  at
     [5]http://www.inbox.com/smileys
     Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and
     most webmails

   ______________________________________________
   [6]R-help at r-project.org mailing list
   [7]https://stat.ethz.ch/mailman/listinfo/r-help
   PLEASE do read the posting guide
   [8]http://www.R-project.org/posting-guide.html
   and provide commented, minimal, self-contained, reproducible code.
     _________________________________________________________________

   [9]3D Marine Aquarium Screensaver Preview 
   Free 3D Marine Aquarium Screensaver
   Watch  dolphins,  sharks  &  orcas  on  your  desktop! Check it out at
   [10]www.inbox.com/marineaquarium

References

   1. mailto:jrkrideau at inbox.com
   2. mailto:tesarants at gmail.com
   3. mailto:r-help at r-project.org
   4. http://www.montefiore.ulg.ac.be/~kvansteen/GBIO0009-1/ac20092010/Class8/Using%20R%20for%20linear%20regression.pdf
   5. http://www.inbox.com/smileys
   6. mailto:R-help at r-project.org
   7. https://stat.ethz.ch/mailman/listinfo/r-help
   8. http://www.R-project.org/posting-guide.html
   9. http://www.inbox.com/marineaquarium
  10. http://www.inbox.com/marineaquarium



More information about the R-help mailing list