Re: [R] Polynomial fitting

2011-07-09 Thread Berry Boessenkool
- Berry Boessenkool Potsdam - Date: Fri, 8 Jul 2011 21:12:46 +0300 From: matti.joki...@gmail.com To: gerrit.eich...@math.uni-giessen.de CC: r-help@r-project.org Subject: Re: [R] Polynomial fitting Thank you Gerrit

Re: [R] Polynomial fitting

2011-07-09 Thread Matti Jokipii
Boessenkool Potsdam - Date: Fri, 8 Jul 2011 21:12:46 +0300 From: matti.joki...@gmail.com To: gerrit.eich...@math.uni-giessen.de CC: r-help@r-project.org Subject: Re: [R] Polynomial fitting Thank you Gerrit for the quick reply! And yes, i'm Matti. I can get

Re: [R] Polynomial fitting

2011-07-08 Thread Matti Jokipii
Thank you Gerrit for the quick reply! And yes, i'm Matti. I can get the coeffs now, though i'm not sure whether i'm doing something wrong or whether poly is just not the right method for what i'm trying to find. I will look into this more closely and give it another try. Is poly best for

[R] Polynomial fitting

2011-07-07 Thread mfa
Hello, i'm fairly familiar with R and use it every now and then for math related tasks. I have a simple non polynomial function that i would like to approximate with a polynomial. I already looked into poly, but was unable to understand what to do with it. So my problem is this. I can generate

Re: [R] Polynomial fitting

2011-07-07 Thread Gerrit Eichner
Hello, mfa (Matti?), if x and y contain the coordinates of your data points and k is the wanted polynomial degree, then fit - lm( y ~ poly( x, k)) fits orthonormal polynomials up to degree k to your data. Using dummy.coef( fit) should give the coefficients you are interested in. Hth --

[R] Polynomial fitting

2009-11-11 Thread Julia Cains
Dear R helpers     Suppose I have a following data   y  - c(9.21, 9.51, 9.73, 9.88, 10.12. 10.21)   t  - c(0, 0.25, 1, 3, 6, 12)   I want to find out the polynomial which fits y in terms of t i.e. y = f(t) some function of t.   e.g.   y = bo + b1*t + (b2 * t^2) + (b3 * t^3) + .. and so on.  

Re: [R] Polynomial Fitting

2009-09-29 Thread chris carleton
fitting the poly and the result was the same coefficients. Thanks very much to anyone who is willing to provide information. Chris Carleton CC: r-help@r-project.org From: r.tur...@auckland.ac.nz Subject: Re: [R] Polynomial Fitting Date: Tue, 29 Sep 2009 13:30:07 +1300 To: w_chris_carle

Re: [R] Polynomial Fitting

2009-09-29 Thread Rolf Turner
On 30/09/2009, at 5:34 AM, chris carleton wrote: Thanks for the response. I'm sorry I didn't provide the code or data example earlier. I was using the polynomial fitting technique of this form; test - lm(x[,34] ~ I(x[,1]) + I(x[,1]^2) + I(x[,1]^3)) for the original fitting operation. I

Re: [R] Polynomial Fitting

2009-09-29 Thread chris carleton
: r.tur...@auckland.ac.nz Subject: Re: [R] Polynomial Fitting Date: Wed, 30 Sep 2009 08:30:15 +1300 To: w_chris_carle...@hotmail.com On 30/09/2009, at 5:34 AM, chris carleton wrote: Thanks for the response. I'm sorry I didn't provide the code or data example earlier. I was using

[R] Polynomial Fitting

2009-09-28 Thread chris carleton
Hello All, This might seem elementary to everyone, but please bear with me. I've just spent some time fitting poly functions to time series data in R using lm() and predict(). I want to analyze the functions once I've fit them to the various data I'm studying. However, after pulling the

Re: [R] Polynomial Fitting

2009-09-28 Thread Rolf Turner
On 29/09/2009, at 10:52 AM, chris carleton wrote: Hello All, This might seem elementary to everyone, but please bear with me. I've just spent some time fitting poly functions to time series data in R using lm() and predict(). I want to analyze the functions once I've fit them to the

Re: [R] Polynomial fitting

2008-01-09 Thread Jonas Malmros
Dear Mr. Rowlingson, Rizopoulos, Jaworski, and Ripley Thank you for your help with the polynomial. Regards, Jonas On Jan 7, 2008 5:18 PM, Barry Rowlingson [EMAIL PROTECTED] wrote: Dimitris Rizopoulos wrote: try this: y - c(15.51, 12.44, 31.5, 21.5, 17.89, 27.09, 15.02, 13.43, 18.18,

[R] Polynomial fitting

2008-01-07 Thread Jonas Malmros
I wonder how one in R can fit a 3rd degree polynomial to some data? Say the data is: y - c(15.51, 12.44, 31.5, 21.5, 17.89, 27.09, 15.02, 13.43, 18.18, 11.32) x - seq(3.75, 6, 0.25) And resulting degrees of polynomial are: 5.8007 -91.6339 472.1726 -774.2584 THanks in advance! -- Jonas

Re: [R] Polynomial fitting

2008-01-07 Thread Dimitris Rizopoulos
, 2008 4:15 PM Subject: [R] Polynomial fitting I wonder how one in R can fit a 3rd degree polynomial to some data? Say the data is: y - c(15.51, 12.44, 31.5, 21.5, 17.89, 27.09, 15.02, 13.43, 18.18, 11.32) x - seq(3.75, 6, 0.25) And resulting degrees of polynomial are: 5.8007 -91.6339

Re: [R] Polynomial fitting

2008-01-07 Thread Barry Rowlingson
Dimitris Rizopoulos wrote: try this: y - c(15.51, 12.44, 31.5, 21.5, 17.89, 27.09, 15.02, 13.43, 18.18, 11.32) x - seq(3.75, 6, 0.25) coef(lm(y ~ x + I(x^2) + I(x^3))) Or use the 'poly' function: coef(lm(x~poly(y,3))) (Intercept) poly(y, 3)1 poly(y, 3)2 poly(y, 3)3 4.875

Re: [R] Polynomial fitting

2008-01-07 Thread apjaworski
Subject [R] Polynomial fitting 01/07/2008 09:16 AM

Re: [R] Polynomial fitting

2008-01-07 Thread Prof Brian Ripley
To Sent by: r-help@r-project.org [EMAIL PROTECTED] cc project.org Subject [R] Polynomial fitting 01