Re: [R] Fitting a curve to data

From: Shirin Safa <sh.safa_at_gmail.com>
Date: Tue, 01 Jul 2008 16:28:02 -0400

no this is not what I want.
I was using "loess" function or smooth.spline. but For loess I don't know how would I be able to get the integral.

On 7/1/08, stephen sefick <ssefick_at_gmail.com> wrote:
>
> ?lm
> lm(x[,1]~x[,2])
>
> On Tue, Jul 1, 2008 at 2:28 PM, Shirin Safa <sh.safa_at_gmail.com> wrote:
>
>> Hi
>>
>> I have a set of data like this:
>>
>> *Time of Day* *Pct of Daily Volume* 9:45 7.50% 10 6.25% 10:15 4.45%
>> 10:30 4.80% 10:45 4.45% 11:00 4.20% 11:15 2.50% 11:30 2.30% 11:45 2.25%
>> 12:00 2.45% 12:15 2.60% 12:30 2.00% 12:45 2.05% 13:00 2.40% 13:15 1.90%
>> 13:30 3.10% 13:45 2.90% 14:00 2.80% 14:15 2.50% 14:30 3.40% 14:45 4.40%
>> 15:00 5.40% 15:15 4.00% 15:30 4.70% 15:45 6.20% 16:00 8.50%
>>
>> I want to fit a curve to the data and get the best function fitted,
>> therefore I can calculate the integral of the function.
>> How can I do that?
>>
>> Thanks,
>> Shirin
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help_at_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.
>>
>
>
>
> --
> Let's not spend our time and resources thinking about things that are so
> little or so large that all they really do for us is puff us up and make us
> feel like gods. We are mammals, and have not exhausted the annoying little
> problems of being mammals.
>
> -K. Mullis

        [[alternative HTML version deleted]]



R-help_at_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. Received on Wed 02 Jul 2008 - 01:05:07 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 Jul 2008 - 16:31:02 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive