Thank you Peter. nls() & predict() seems to do the job. dror -------------------------
On Wed, Dec 30, 2009 at 8:10 PM, Peter Ehlers <ehl...@ucalgary.ca> wrote: > Sounds like you might want to use nls() to fit the data > and then use either curve() or predict() to do the > plotting. > > -Peter Ehlers > > Dror D Lev wrote: > >> Hi, >> >> I tried to be comprehensive but Jim's comment is indeed in place. >> >> I have data of a practice experiment where people practice a certain motor >> task and time-to-completion was recorded. >> Appropriately, the time measure declines as practice goes on. And, again >> appropriately, the relation seems to be non-linear. It looks like y=1/x >> but >> much less steep. >> I understand that the general case of such functions is called >> power-function. >> >> So what I'm looking for is something like abline() with a power-function >> fit >> (rather then a linear one). >> >> Jim is also correct writing that I would like to have separate fits for >> 'c' >> and 'nc'. >> Of course this can be achieved using subset() but, as Dennis wrote, some >> graphic functions include an option to graph the data by groups. >> >> Thanks again for any tip or reference. >> >> dror >> >> ------------- >> >> On Tue, Dec 29, 2009 at 10:56 PM, jim holtman <jholt...@gmail.com> wrote: >> >> It would help if you were more explicit on what you were trying to look >>> at. I assume that you want two curves ('c' and'nc') on one graphs and >>> you >>> can do that with the basic plot routines, or you can use the 'lattice' >>> package, but without knowing what you are looking for, it is hard to >>> tell. >>> >>> On Tue, Dec 29, 2009 at 3:33 PM, Dror D Lev <dror.te...@gmail.com> >>> wrote: >>> >>> Hello, >>>> >>>> I have practice data of motor action in the format: >>>> >>>> S | Cond. | Time >>>> ----+---------+-------- >>>> 01 | c | 1.23 >>>> 01 | nc | 0.89 >>>> 02 | c | 2.15 >>>> 02 | nc | 1.80 >>>> ..... >>>> >>>> I want to look at the learning curves graphically. >>>> >>>> I will appreciate pointers to relevant functions / packages. >>>> >>>> Thanks in advance, >>>> dror >>>> >>>> [[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< >>>> http://www.r-project.org/posting-guide.html> >>>> >>>> and provide commented, minimal, self-contained, reproducible code. >>>> >>>> >>> >>> -- >>> Jim Holtman >>> Cincinnati, OH >>> +1 513 646 9390 >>> >>> What is the problem that you are trying to solve? >>> >>> >> [[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. >> >> >> > -- > Peter Ehlers > University of Calgary > 403.202.3921 > [[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.