[R] how to solve a power series linear coefficient equation

From: e-letter <inpost_at_gmail.com>
Date: Tue, 29 Apr 2008 16:22:53 +0100


I am having difficulty understanding how to enter commands into r.

I have data arranged as:

100, 200, 300
5.6, 6.7, 7.8
8.9, 9.0, 0.1
1.2, 2.3, 3.4

The data is saved in csv format and I use the command 'read.table' to import into r.

The values 5.6...3.4 are a function of values 100,...300, i.e. 100,...300 are independent variables (x). The function is a power series:


How do I obtain the values of a,b,c by minimisation of the sum of squares of deviations?

So far looking at the documentation 'r-intro' section 10, I tried the following:

+ a<-sum(a)
+ b<-sum(b)
+ c<-sum(c)
+ y<-(a+bx+cx^2)
+ x<-(x)
+ }

The documentation states: "...using a call such as...". What does this mean?



gnu/linux mandriva 2008
r 251 (27-06-07)

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 Tue 29 Apr 2008 - 17:05:11 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 Tue 29 Apr 2008 - 22:30:37 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