Y = a(X-b)^n Where Y and X are variables and a, b, n are parameters to be estimated Can any one direct me to script to create such a function, hopefully with goodness of fit of model All help gratefully received Best Diana Emeritus Professor Diana Kornbrot email: d.e.kornbrot@... web: http://dianakornbrot.wordpress.com/ Work Department of Psychology School of Life and Medical Sciences University of Hertfordshire College Lane, Hatfield, Hertfordshire AL10 9AB, UK voice: +44 (0) 170 728 4626 fax: +44 (0) 170 728 5073 Home 19 Elmhurst Avenue London N2 0LT, UK voice: +44 (0) 208 444 2081 mobile: +44 (0) 740 318 1612 fax: +44 (0) 870 706 1445 |
Administrator
|
NLR, CNLR, maybe Curvefit?
--
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by Kornbrot, Diana
You can do this with NLR. Here's
an example.
MODEL PROGRAM a=1000 b=50 n=2. COMPUTE PRED_=a*(abs(jobtime-b))**n. NLR salary /OUTFILE='D:\spsstemp3\spss3072\SPSSFNLR.TMP'. But note that I inserted an absolute value function in order to deal with the issue of fractional n with a negative number. Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] new phone: 720-342-5621 From: "Kornbrot, Diana" <[hidden email]> To: [hidden email], Date: 10/12/2012 12:35 PM Subject: [SPSSX-L] Fitting power fnction Sent by: "SPSSX(r) Discussion" <[hidden email]> Want to fit following function in spss: Y = a(X-b)^n Where Y and X are variables and a, b, n are parameters to be estimated Can any one direct me to script to create such a function, hopefully with goodness of fit of model All help gratefully received Best Diana Emeritus Professor Diana Kornbrot email: d.e.kornbrot@... web: http://dianakornbrot.wordpress.com/ Work Department of Psychology School of Life and Medical Sciences University of Hertfordshire College Lane, Hatfield, Hertfordshire AL10 9AB, UK voice: +44 (0) 170 728 4626 fax: +44 (0) 170 728 5073 Home 19 Elmhurst Avenue London N2 0LT, UK voice: +44 (0) 208 444 2081 mobile: +44 (0) 740 318 1612 fax: +44 (0) 870 706 1445 |
Of course, Non Linear Regression [NLR]: regression > non-linear works absolutely fine, even using dialogue boxes Parameters are straightforward to defin, with starting points. There are warnings where iterations include neg numbers to fractional powers, but converges fine. Same solution as R, which is a relief Was being really stupid & apologize for bothering exellent spss list Best Diana On 12/10/2012 19:53, "Jon K Peck" <peck@...> wrote: You can do this with NLR. Here's an example. Emeritus Professor Diana Kornbrot email: d.e.kornbrot@... web: http://dianakornbrot.wordpress.com/ Work Department of Psychology School of Life and Medical Sciences University of Hertfordshire College Lane, Hatfield, Hertfordshire AL10 9AB, UK voice: +44 (0) 170 728 4626 fax: +44 (0) 170 728 5073 Home 19 Elmhurst Avenue London N2 0LT, UK voice: +44 (0) 208 444 2081 mobile: +44 (0) 740 318 1612 fax: +44 (0) 870 706 1445 |
Free forum by Nabble | Edit this page |