(cross post, but I think this area gets more traffic) Hello--
I have a data set that shows a nonlinear response. I was trying to model it to the generic Y=AB**X algebraic curve. Since I need to reflect and translate it I think the form is Y = [AB**(-X+H)] + K
/* where: Y is the response */ /* -X reflects Y=AB**X */ /* A and B affect the shape the curve */ /* H translates the curve on the X axis */ /* K translates the curve on the Y axis */ However, when I run PROC NLIN, the procedure doesn't try to optimize a value for H. It just accepts the value I set in the PARM statement. The model it creates fits okay, but I am forced to wonder if I am doing this right since I haven't done my own non-linear model in quite some time. I am not opposed to using another function either, but I am rusty on my algebra. Comments on my choice of function would also be welcome. I am aware of the observation at line 106 7.044 28.2205 ----------code------------
data a; input X csfc;
cards; 19.894 2.1695 14.357 3.1134 14.634 2.8468 16.849 2.8502 20.73 2.0644 21.313 1.885 21.078 2.0202 22.711 1.828 18.571 2.2236 17.324 5.1571 16.833 2.3027 7.787 5.2283 13.571 3.2182 16.709 2.4278 103.36 1.9032 14.626 2.7794 11.961 4.0494 16.649 2.4224 11.9 3.1598 12.037 3.4 15.27 2.7087 15.71 3.1774 16.64 2.4366 22.985 1.8892 13.589 3.0338 13.231 3.5303 9.916 2.3978 16.875 2.6956 15.502 2.6239 62.418 1.8696 67.368 1.9096 12.707 4.5418 13.646 3.5238 12.347 3.7747 10.492 5.9589 12.92 5.6311 15.703 4.804 15.945 3.7153 17.812 2.906 19.456 2.3938 16.081 2.8086 15.193 2.8184 12.06 3.7871 11.997 3.464 13.977 3.0224 17.165 2.3578 9.955 4.2154 10.078 3.8764 11.896 3.5085 10.837 3.8571 8.536 4.7339 8.312 4.9184 9.301 4.9311 10.705 3.8221 9.366 5.0422 22.31 2.5539 21.365 2.1591 21.251 2.1821 19.524 2.2874 19.934 2.1676 13.886 3.8416 15.718 2.8793 14.531 3.3531 14.332 3.3009 17.202 2.7417 16.869 2.4636 14.337 3.108 16.054 2.7407 10.45 6.3506 34.281 1.8753 40.231 1.6295 34.453 1.8897 38.428 1.7759 40.005 1.6519 90.734 0.9022 36.63 1.726 35.402 1.7388 76.791 0.8395 35.249 1.6582 48.56 1.2963 39.266 1.6639 44.37 1.452 41.683 1.4932 45.59 1.5308 74.01 0.8218 45.272 1.376 44.352 1.5411 37.685 1.8526 42.117 1.7654 38.659 1.7523 45.305 1.537 46.625 1.4801 45.971 1.435 42.783 1.4562 39.755 1.6883 47.272 1.4124 43.601 1.5922 49.839 1.8895 49.527 1.5169 46.418 1.5731 55.454 1.3089 7.044 28.2205 48.519 1.5486 48.658 1.4955 54.508 1.5457 46.313 1.7545 9.346 5.3788 9.147 5.1461 10.428 5.0431 18.505 2.7788 16.651 3.2919 22.862 2.5291 25.334 2.0102 12.182 4.1494 10.23 5.3308 9.134 5.0723 8.594 5.6128 10.669 4.3122 9.316 5.1614 16.287 3.1224 12.83 3.883 63.214 1.586 58.959 1.3681 55.911 1.6491 65.894 1.8837 56.965 1.3704 56.958 1.3552 62.972 1.3213 78.47 1.2049 64.248 1.348 72.855 1.1896 63.487 1.41 57.215 1.3024 56.201 1.4495 60.765 1.3704 65.9 1.3719 62.118 1.3137 26.976 1.7391 26.521 1.5494 29.442 1.6611 26.807 1.5139 26.365 1.5992 30.367 1.5658 21.368 2.3015 14.443 3.1963 19.454 3.3426 21.448 2.1596 14.986 5.916 20.085 2.3998 27.787 1.7884 26.624 1.809 32.641 1.5445 23.44 2.1039 65.804 1.8539 21.747 1.873 28.834 1.4601 25.411 1.6552 21.637 1.9228 37.783 1.3651 32.867 1.9354 34.038 1.0684 29.043 1.5156 38.605 1.7499 42.605 1.4879 38.399 0.8986 37.153 1.3436 18.009 1.5775 19.849 1.7135 19.305 1.9004 20.067 1.6874 20.61 1.6846 23.473 1.5383 16.409 2.246 32.881 1.0103 20.855 1.6756 22.072 1.5011 22.399 1.5077 22.422 1.6045 28.705 1.5148 21.491 2.0123 24.138 1.6838 23.237 1.5113 18.886 1.7919 23.216 1.4259 23.471 1.4605 23.227 1.5253 25.337 1.3194 19.049 1.7622 19.681 1.8024 20.113 1.6858 19.748 1.8308 26.875 1.2624 31.016 1.1567 16.783 2.9245 21.099 1.6738 20.545 1.6725 18.909 2.8377 32.773 1.1761 26.978 1.2892 36.644 1.7227 23.856 1.4219 22.931 1.4248 22.589 1.6277 13.077 2.6969 19.172 1.9055 12.508 2.0986 24.206 1.4886 ;; run;
/* CSFC by X appears to follow a modified version of AB**X */ /* */ /* Y = AB**(-X + H) + K */ /* */ /* where: Y is the response */ /* -X reflects Y=AB**X */ /* A and B affect the shape the curve */ /* H translates the curve on the X axis */ /* K translates the curve on the Y axis */
proc nlin data=a; parameters A = 1 B = 1.0125 H = 17 K = 2;
model CSFC = A * B**(-X + H) + K;
* output out=pred p=Yhat l95m=low_conf u95m=up_conf sse=sse; run;
... View more