Re: [R] [newbie] Want to perform some simple regressions.

From: jim holtman <jholtman_at_gmail.com>
Date: Sun 28 Aug 2005 - 21:26:00 EST

try 'nls'

Here is your data applied to it. It looks like you had an 'exact' fit:

> x.1[1:10,]

   V1 V2

1   0  2.205955
2   1  8.150580
3   2 15.851324
4   3 22.442796
5   4 29.358580
6   5 36.460605
7   6 43.751692
8   7 51.223688
9   8 58.866102
10  9 66.668220

> x.p <- nls(V2 ~ (a*V1+b)*log(c*V1+d),x.1,start=list(a=1,b=1,c=1,d=1))
> x.p

Nonlinear regression model
  model: V2 ~ (a * V1 + b) * log(c * V1 + d)    data: x.1

       a b c d
1.994722 6.807986 1.495003 1.301922
 residual sum-of-squares: 1.006867

On 8/28/05, Thomas Baruchel <archaiesteron@laposte.net> wrote:
> On Sun, Aug 28, 2005 at 09:48:15AM +0200, Thomas Baruchel wrote:
> > Is R the right choice ? Please, could you step by step show me
> > how you would do on this example (data below) in order to let me
>
> I forgot my data :-(
>
> 0 2.205954909440447
> 1 8.150580118785099
> 2 15.851323727378597
> 3 22.442795956953574
> 4 29.358579800271354
> 5 36.46060528847214
> 6 43.7516923268591
> 7 51.223688311610026
> 8 58.86610205087116
> 9 66.66821956399055
> 10 74.61990268453171
> 11 82.71184423952718
> 12 90.93560520053082
> 13 99.28356700194489
> 14 107.74885489906521
> 15 116.3252559311549
> 16 125.00714110112291
> 17 133.78939523822717
> 18 142.6673553086964
> 19 151.63675679510055
> 20 160.69368733376777
> 21 169.834546691509
> 22 179.05601219606618
> 23 188.35500882314003
> 24 197.72868324657364
> 25 207.17438125936408
> 26 216.68962806440814
> 27 226.2721110130965
> 28 235.9196644372003
> 29 245.63025627606442
> 30 255.40197624835042
> 31 265.23302535689197
> 32 275.12170654792556
> 33 285.06641637317705
> 34 295.0656375259694
> 35 305.1179321414606
> 36 315.2219357669857
> 37 325.3763519217964
> 38 335.5799471767038
> 39 345.8315466936063
> 40 356.13003017290697
> 41 366.4743281636434
> 42 376.8634186969678
> 43 387.2963242085816
> 44 397.77210871999046
> 45 408.2898752521091
> 46 418.8487634479048
> 47 429.44794738349896
> 48 440.08663354951693
> 49 450.76405898653184
> 50 461.479489560246
> 51 472.2322183636179
> 52 483.02156423451737
> 53 493.84687037869463
> 54 504.707503088911
> 55 515.6028505520102
> 56 526.5323217365377
> 57 537.4953453542455
> 58 548.4913688894654
> 59 559.5198576909147
> 60 570.5802941210067
> 61 581.6721767581994
> 62 592.7950196483222
> 63 603.9483516011882
> 64 615.1317155291274
> 65 626.3446678243708
> 66 637.5867777724806
> 67 648.8576269992603
> 68 660.1568089487967
> 69 671.4839283904737
> 70 682.838600952985
> 71 694.2204526835204
> 72 705.6291196304554
> 73 717.0642474479981
> 74 728.5254910213728
> 75 740.0125141112243
> 76 751.5249890160294
> 77 763.062596251391
> 78 774.6250242451752
> 79 786.2119690475241
> 80 797.8231340548524
> 81 809.4582297469931
> 82 821.1169734367211
> 83 832.7990890309349
> 84 844.5043068028273
> 85 856.2323631744205
>
> Regards,
>
> --
> Thomas Baruchel
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Jim Holtman
Convergys
+1 513 723 2929

What the problem you are trying to solve?

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sun Aug 28 21:34:14 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 16:01:28 EST