Hi,
I would like to fit the data (see attached .csv file for the data) in following equation and want to get the parameters, i.e., a, b, c, d, e, and f.
Could you please help me out for finding correct code or resources for non-linear curve fitting. thank you very much in advance!
y = a + b*[1-exp(-x/c)] + d*[1-exp(-x/e)] + f*x
For non linear regression in SAS, see PROC NLIN and PROC TRANSREG. PROC NLIN is probably the best choice here.
Provide sample data in the form of a data step to get a code answer.
x y 0.000544 1.77E-06 0.001568 5.41E-06 0.002592 0.00001251 0.003616 0.000021935 0.00464 0.000032702 0.005664 0.000045242 0.006688 0.000056652 0.007712 0.000068892 0.008736 0.000078402 0.00976 0.000084212 0.010784 0.000086692 0.011808 0.000085242 0.012832 0.000080972 0.013856 0.000075862 0.01488 0.000070702 0.015904 0.000065842 0.016928 0.000061162 0.017952 0.000056582 0.018976 0.000051312 0.02 0.000046122 0.021024 0.000041682 0.022048 0.000040732 0.023072 0.000043332 0.024096 0.000049972 0.02512 0.000059102 0.026144 0.000068202 0.027168 0.000075832 0.028192 0.000080132 0.029216 0.000081402 0.03024 0.000080242 0.031264 0.000078402 0.032288 0.000075612 0.033312 0.000074082 0.034336 0.000071932 0.03536 0.000069362 0.036384 0.000066432 0.037408 0.000062822 0.038432 0.000060242 0.039456 0.000059732 0.04048 0.000061132 0.042016 0.000065252 0.044064 0.000068292 0.046112 0.000068362 0.04816 0.000071012 0.050208 0.000077392 0.052256 0.000081422 0.054304 0.000076572 0.056352 0.000069772 0.0584 0.000069022 0.060448 0.000071172 0.062496 0.000070592 0.064544 0.000071202 0.066592 0.000075272 0.06864 0.000079322 0.070688 0.000077832 0.072736 0.000075482 0.074784 0.000078272 0.076832 0.000080132 0.07888 0.000077202 0.080928 0.000072302 0.082976 0.000073572 0.085024 0.000078672 0.087072 0.000079742 0.08912 0.000078102 0.091168 0.000078472 0.093216 0.000079952 0.095264 0.000079412 0.097312 0.000078062 0.09936 0.000079762 0.10141 0.000080032 0.10346 0.000076942 0.1055 0.000074652 0.10755 0.000078492 0.1096 0.000085122 0.11165 0.000084732 0.1137 0.000078792 0.11574 0.000076922 0.11779 0.000080562 0.11984 0.000084202 0.12189 0.000083262 0.12496 0.000082642 0.12906 0.000077202 0.13315 0.000082932 0.13725 0.000086932 0.14134 0.000081562 0.14544 0.000085862 0.14954 0.000081752 0.15363 0.000081392 0.15773 0.000087072 0.16182 0.000087272 0.16592 0.000082582 0.17002 0.000086862 0.17411 0.000084882 0.17821 0.000087592 0.1823 0.000087392 0.1864 0.000089822 0.1905 0.000086152 0.19459 0.000087862 0.19869 0.000085832 0.20278 0.000091062 0.20688 0.000088662 0.21098 0.000089182 0.21507 0.000087422 0.21917 0.000091372 0.22326 0.000087312 0.22736 0.000094712 0.23146 0.000088022 0.23555 0.000088682 0.23965 0.000089042 0.24374 0.000092282 0.24784 0.000090032 0.25194 0.000094222 0.25603 0.000090522 0.26013 0.000091502 0.26422 0.000087922 0.26832 0.000096702 0.27242 0.000091192 0.27651 0.000092922 0.28061 0.000090502 0.2847 0.000092792 0.29085 0.000094512 0.29904 0.000093502 0.30723 0.000094392 0.31542 0.000094582 0.32362 0.000093462 0.33181 0.000094742 0.34 0.000095712 0.34819 0.000095682 0.35638 0.000096302 0.36458 0.000096282 0.37277 0.000096722 0.38096 0.000096522 0.38915 0.000096972 0.39734 0.000096552 0.40554 0.000098702 0.41373 0.000097962 0.42192 0.000097612 0.43011 0.000098242 0.4383 0.000098482 0.4465 0.000099662 0.45469 0.000099382 0.46288 0.000098382 0.47107 0.000100032 0.47926 0.000099772 0.48746 0.000100682 0.49565 0.000100282 0.50384 0.000100412 0.51203 0.000101322 0.52022 0.000101802 0.52842 0.000100842 0.53661 0.000103092 0.5448 0.000102142 0.55299 0.000099552 0.56118 0.000102622 0.56938 0.000103752 0.57757 0.000102222 0.58576 0.000102702 0.59395 0.000102662 0.60214 0.000103722 0.61034 0.000103612 0.62262 0.000104152 0.63901 0.000104492 0.65539 0.000104882 0.67178 0.000105672 0.68816 0.000104752 0.70454 0.000106292 0.72093 0.000107302 0.73731 0.000106522 0.7537 0.000106302 0.77008 0.000108072 0.78646 0.000108382 0.80285 0.000108142 0.81923 0.000108642 0.83562 0.000108572 0.852 0.000110432 0.86838 0.000109772 0.88477 0.000108712 0.90115 0.000109762 0.91754 0.000109892 0.93392 0.000110412 0.9503 0.000110252 0.96669 0.000111092 0.98307 0.000112322 0.99946 0.000112052 1.0158 0.000112892 1.0322 0.000112802 1.0486 0.000112482 1.065 0.000112842 1.0814 0.000113412 1.0978 0.000114352 1.1141 0.000114152 1.1305 0.000113232 1.1469 0.000115172 1.1633 0.000115862 1.1797 0.000115372 1.1961 0.000114532 1.2124 0.000115262 1.2288 0.000116192 1.2452 0.000116232 1.2616 0.000116362 1.2862 0.000116162 1.3189 0.000116562 1.3517 0.000117522 1.3845 0.000117852 1.4172 0.000118772 1.45 0.000118512 1.4828 0.000119712 1.5156 0.000119062 1.5483 0.000120662 1.5811 0.000120522 1.6139 0.000121442 1.6466 0.000121732 1.6794 0.000121312 1.7122 0.000122972 1.7449 0.000122142 1.7777 0.000123552 1.8105 0.000123252 1.8432 0.000123882 1.876 0.000124512 1.9088 0.000124852 1.9415 0.000125722 1.9743 0.000125602 2.0071 0.000125792 2.0398 0.000125462 2.0726 0.000126252 2.1054 0.000125902 2.1381 0.000126922 2.1709 0.000127042 2.2037 0.000127962 2.2364 0.000127472 2.2692 0.000128242 2.302 0.000128652 2.3348 0.000129092 2.3675 0.000128582 2.4003 0.000129982 2.4331 0.000129642 2.4658 0.000130732 2.4986 0.000130092 2.5314 0.000130902 2.5641 0.000130442 2.6133 0.000131182 2.6788 0.000131442 2.7444 0.000132332 2.8099 0.000132922 2.8754 0.000133242 2.941 0.000134022 3.0065 0.000134222 3.072 0.000134972 3.1376 0.000135802 3.2031 0.000136732 3.2686 0.000136852 3.3342 0.000137082 3.3997 0.000137332 3.4652 0.000137432 3.5308 0.000138002 3.5963 0.000138832 3.6619 0.000139542 3.7274 0.000139722 3.7929 0.000140222 3.8585 0.000140082 3.924 0.000140672 3.9895 0.000140812 4.0551 0.000141492 4.1206 0.000141742 4.1861 0.000142162 4.2517 0.000142812 4.3172 0.000143412 4.3828 0.000143332 4.4483 0.000143962 4.5138 0.000144252 4.5794 0.000145062 4.6449 0.000145252 4.7104 0.000145522 4.776 0.000145562 4.8415 0.000145862 4.907 0.000146352 4.9726 0.000146852 5.0381 0.000147302 5.1036 0.000147442 5.1692 0.000147412 5.2675 0.000147772 5.3986 0.000148852 5.5296 0.000149202 5.6607 0.000149562 5.7918 0.000150212 5.9228 0.000150772 6.0539 0.000151702 6.185 0.000152362 6.3161 0.000152902 6.4471 0.000153962 6.5782 0.000154482 6.7093 0.000155302 6.8404 0.000155992 6.9714 0.000156382 7.1025 0.000156912 7.2336 0.000157812 7.3646 0.000157812 7.4957 0.000158322 7.6268 0.000158672 7.7579 0.000159542 7.8889 0.000160032 8.02 0.000160452 8.1511 0.000160762 8.2821 0.000161172 8.4132 0.000161612 8.5443 0.000162522 8.6754 0.000163232 8.8064 0.000163652 8.9375 0.000164692 9.0686 0.000164442 9.1996 0.000165192 9.3307 0.000165422 9.4618 0.000166042 9.5929 0.000166552 9.7239 0.000166922 9.855 0.000167672 9.9861 0.000168052 10.117 0.000168142 10.248 0.000168782 10.379 0.000169182 10.576 0.000169402 10.838 0.000170732 11.1 0.000171432 11.362 0.000172402 11.624 0.000172982 11.887 0.000174122 12.149 0.000175252 12.411 0.000176212 12.673 0.000176622 12.935 0.000177632 13.197 0.000178142 13.459 0.000179092 13.722 0.000180022 13.984 0.000180822 14.246 0.000181232 14.508 0.000182482 14.77 0.000183502 15.032 0.000183952 15.294 0.000184232 15.557 0.000184812 15.819 0.000185742 16.081 0.000186482 16.343 0.000187632 16.605 0.000187862 16.867 0.000188532 17.13 0.000189542 17.392 0.000189912 17.654 0.000190542 17.916 0.000191252 18.178 0.000192012 18.44 0.000192412 18.702 0.000193522 18.965 0.000194182 19.227 0.000194602 19.489 0.000195212 19.751 0.000195542 20.013 0.000196232 20.275 0.000197042 20.537 0.000197822 20.8 0.000198622 21.193 0.000199112 21.717 0.000200422 22.241 0.000201362 22.766 0.000202302 23.29 0.000203182 23.814 0.000204352 24.338 0.000205152 24.863 0.000206302 25.387 0.000207342 25.911 0.000208472 26.436 0.000209302 26.96 0.000210492 27.484 0.000211472 28.008 0.000212252 28.533 0.000213092 29.057 0.000214092 29.581 0.000214902 30.106 0.000215752 30.63 0.000216782 31.154 0.000217222 31.678 0.000218512 32.203 0.000219112 32.727 0.000219912 33.251 0.000221092 33.776 0.000221572 34.3 0.000222252 34.824 0.000222642 35.349 0.000223532 35.873 0.000224582 36.397 0.000224982 36.921 0.000225902 37.446 0.000226352 37.97 0.000227212 38.494 0.000228032 39.019 0.000228482 39.543 0.000229422 40.067 0.000229702 40.591 0.000230762 41.116 0.000231772 41.64 0.000232482 42.426 0.000233302 43.475 0.000234632 44.524 0.000235912 45.572 0.000237822 46.621 0.000239482 47.669 0.000240812 48.718 0.000242072 49.766 0.000243562 50.815 0.000245142 51.864 0.000246362 52.912 0.000247272 53.961 0.000248652 55.009 0.000250042 56.058 0.000251122 57.106 0.000252522 58.155 0.000253602 59.204 0.000254502 60.252 0.000255732 61.301 0.000256822 62.349 0.000258162 63.398 0.000258982 64.446 0.000260202 65.495 0.000261162 66.544 0.000262312 67.592 0.000263522 68.641 0.000264442 69.689 0.000265182 70.738 0.000266372 71.787 0.000267342 72.835 0.000268222 73.884 0.000269232 74.932 0.000270142 75.981 0.000271652 77.029 0.000272442 78.078 0.000273402 79.127 0.000274682 80.175 0.000275302 81.224 0.000276292 82.272 0.000277062 83.321 0.000277972 84.894 0.000279472 86.991 0.000281492 89.088 0.000282762 91.185 0.000284712 93.282 0.000286262 95.379 0.000287832 97.477 0.000290132 99.574 0.000291762 101.67 0.000293202 103.77 0.000294772 105.87 0.000296532 107.96 0.000298432 110.06 0.000299902 112.16 0.000301182 114.25 0.000302792 116.35 0.000303942 118.45 0.000305392 120.55 0.000306842 122.64 0.000308512 124.74 0.000310802 126.84 0.000312682 128.93 0.000314502 131.03 0.000316192 133.13 0.000317592 135.23 0.000318682 137.32 0.000319772 139.42 0.000321362 141.52 0.000323072 143.61 0.000324872 145.71 0.000326172 147.81 0.000327602 149.91 0.000328942 152 0.000330632 154.1 0.000331762 156.2 0.000333352 158.29 0.000334452 160.39 0.000335872 162.49 0.000337132 164.59 0.000338042 166.68 0.000339132 169.83 0.000340852 174.02 0.000343242 178.22 0.000346512 182.41 0.000349862 186.61 0.000352962 190.8 0.000355142 194.99 0.000357902 199.19 0.000359802 203.38 0.000362052 207.58 0.000364642 211.77 0.000366472 215.97 0.000368322 220.16 0.000370292 224.35 0.000372702 228.55 0.000374762 232.74 0.000376552 236.94 0.000378322 241.13 0.000380132 245.33 0.000382192 249.52 0.000384632 253.71 0.000386622 257.91 0.000388572 262.1 0.000390492 266.3 0.000392202 270.49 0.000394932 274.69 0.000397562 278.88 0.000399472 283.07 0.000400902 287.27 0.000403152 291.46 0.000404792 295.66 0.000406292 299.85 0.000408122 304.05 0.000410002 308.24 0.000411872 312.43 0.000413952 316.63 0.000415832 320.82 0.000417942 325.02 0.000419562 329.21 0.000421632 333.41 0.000424302 339.7 0.000426592 348.09 0.000429652 356.47 0.000433322 364.86 0.000436712 373.25 0.000439882 381.64 0.000443852 390.03 0.000447302 398.42 0.000450252 406.81 0.000452952 415.2 0.000455762 423.58 0.000457312 431.97 0.000460302 440.36 0.000463662 448.75 0.000466432 457.14 0.000470232 465.53 0.000473722 473.92 0.000477042 482.3 0.000479922 490.69 0.000482332 499.08 0.000485322 507.47 0.000486972 515.86 0.000489302 524.25 0.000492742 532.64 0.000495012 541.02 0.000497332 549.41 0.000500812 557.8 0.000503172 566.19 0.000505812 574.58 0.000508142 582.97 0.000510362 591.36 0.000513092 591.36 0.000513592
Thank you very much for quick response! please see above for data
A csv is not a SAS data set. Choices need to be made to get a SAS data set and mine may not match yours. So a solution I develop that works for MY version of your data may not work for you.
Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.
x y 0.000544 1.77E-06 0.001568 5.41E-06 0.002592 0.00001251 0.003616 0.000021935 0.00464 0.000032702 0.005664 0.000045242 0.006688 0.000056652 0.007712 0.000068892 0.008736 0.000078402 0.00976 0.000084212 0.010784 0.000086692 0.011808 0.000085242 0.012832 0.000080972 0.013856 0.000075862 0.01488 0.000070702 0.015904 0.000065842 0.016928 0.000061162 0.017952 0.000056582 0.018976 0.000051312 0.02 0.000046122 0.021024 0.000041682 0.022048 0.000040732 0.023072 0.000043332 0.024096 0.000049972 0.02512 0.000059102 0.026144 0.000068202 0.027168 0.000075832 0.028192 0.000080132 0.029216 0.000081402 0.03024 0.000080242 0.031264 0.000078402 0.032288 0.000075612 0.033312 0.000074082 0.034336 0.000071932 0.03536 0.000069362 0.036384 0.000066432 0.037408 0.000062822 0.038432 0.000060242 0.039456 0.000059732 0.04048 0.000061132 0.042016 0.000065252 0.044064 0.000068292 0.046112 0.000068362 0.04816 0.000071012 0.050208 0.000077392 0.052256 0.000081422 0.054304 0.000076572 0.056352 0.000069772 0.0584 0.000069022 0.060448 0.000071172 0.062496 0.000070592 0.064544 0.000071202 0.066592 0.000075272 0.06864 0.000079322 0.070688 0.000077832 0.072736 0.000075482 0.074784 0.000078272 0.076832 0.000080132 0.07888 0.000077202 0.080928 0.000072302 0.082976 0.000073572 0.085024 0.000078672 0.087072 0.000079742 0.08912 0.000078102 0.091168 0.000078472 0.093216 0.000079952 0.095264 0.000079412 0.097312 0.000078062 0.09936 0.000079762 0.10141 0.000080032 0.10346 0.000076942 0.1055 0.000074652 0.10755 0.000078492 0.1096 0.000085122 0.11165 0.000084732 0.1137 0.000078792 0.11574 0.000076922 0.11779 0.000080562 0.11984 0.000084202 0.12189 0.000083262 0.12496 0.000082642 0.12906 0.000077202 0.13315 0.000082932 0.13725 0.000086932 0.14134 0.000081562 0.14544 0.000085862 0.14954 0.000081752 0.15363 0.000081392 0.15773 0.000087072 0.16182 0.000087272 0.16592 0.000082582 0.17002 0.000086862 0.17411 0.000084882 0.17821 0.000087592 0.1823 0.000087392 0.1864 0.000089822 0.1905 0.000086152 0.19459 0.000087862 0.19869 0.000085832 0.20278 0.000091062 0.20688 0.000088662 0.21098 0.000089182 0.21507 0.000087422 0.21917 0.000091372 0.22326 0.000087312 0.22736 0.000094712 0.23146 0.000088022 0.23555 0.000088682 0.23965 0.000089042 0.24374 0.000092282 0.24784 0.000090032 0.25194 0.000094222 0.25603 0.000090522 0.26013 0.000091502 0.26422 0.000087922 0.26832 0.000096702 0.27242 0.000091192 0.27651 0.000092922 0.28061 0.000090502 0.2847 0.000092792 0.29085 0.000094512 0.29904 0.000093502 0.30723 0.000094392 0.31542 0.000094582 0.32362 0.000093462 0.33181 0.000094742 0.34 0.000095712 0.34819 0.000095682 0.35638 0.000096302 0.36458 0.000096282 0.37277 0.000096722 0.38096 0.000096522 0.38915 0.000096972 0.39734 0.000096552 0.40554 0.000098702 0.41373 0.000097962 0.42192 0.000097612 0.43011 0.000098242 0.4383 0.000098482 0.4465 0.000099662 0.45469 0.000099382 0.46288 0.000098382 0.47107 0.000100032 0.47926 0.000099772 0.48746 0.000100682 0.49565 0.000100282 0.50384 0.000100412 0.51203 0.000101322 0.52022 0.000101802 0.52842 0.000100842 0.53661 0.000103092 0.5448 0.000102142 0.55299 0.000099552 0.56118 0.000102622 0.56938 0.000103752 0.57757 0.000102222 0.58576 0.000102702 0.59395 0.000102662 0.60214 0.000103722 0.61034 0.000103612 0.62262 0.000104152 0.63901 0.000104492 0.65539 0.000104882 0.67178 0.000105672 0.68816 0.000104752 0.70454 0.000106292 0.72093 0.000107302 0.73731 0.000106522 0.7537 0.000106302 0.77008 0.000108072 0.78646 0.000108382 0.80285 0.000108142 0.81923 0.000108642 0.83562 0.000108572 0.852 0.000110432 0.86838 0.000109772 0.88477 0.000108712 0.90115 0.000109762 0.91754 0.000109892 0.93392 0.000110412 0.9503 0.000110252 0.96669 0.000111092 0.98307 0.000112322 0.99946 0.000112052 1.0158 0.000112892 1.0322 0.000112802 1.0486 0.000112482 1.065 0.000112842 1.0814 0.000113412 1.0978 0.000114352 1.1141 0.000114152 1.1305 0.000113232 1.1469 0.000115172 1.1633 0.000115862 1.1797 0.000115372 1.1961 0.000114532 1.2124 0.000115262 1.2288 0.000116192 1.2452 0.000116232 1.2616 0.000116362 1.2862 0.000116162 1.3189 0.000116562 1.3517 0.000117522 1.3845 0.000117852 1.4172 0.000118772 1.45 0.000118512 1.4828 0.000119712 1.5156 0.000119062 1.5483 0.000120662 1.5811 0.000120522 1.6139 0.000121442 1.6466 0.000121732 1.6794 0.000121312 1.7122 0.000122972 1.7449 0.000122142 1.7777 0.000123552 1.8105 0.000123252 1.8432 0.000123882 1.876 0.000124512 1.9088 0.000124852 1.9415 0.000125722 1.9743 0.000125602 2.0071 0.000125792 2.0398 0.000125462 2.0726 0.000126252 2.1054 0.000125902 2.1381 0.000126922 2.1709 0.000127042 2.2037 0.000127962 2.2364 0.000127472 2.2692 0.000128242 2.302 0.000128652 2.3348 0.000129092 2.3675 0.000128582 2.4003 0.000129982 2.4331 0.000129642 2.4658 0.000130732 2.4986 0.000130092 2.5314 0.000130902 2.5641 0.000130442 2.6133 0.000131182 2.6788 0.000131442 2.7444 0.000132332 2.8099 0.000132922 2.8754 0.000133242 2.941 0.000134022 3.0065 0.000134222 3.072 0.000134972 3.1376 0.000135802 3.2031 0.000136732 3.2686 0.000136852 3.3342 0.000137082 3.3997 0.000137332 3.4652 0.000137432 3.5308 0.000138002 3.5963 0.000138832 3.6619 0.000139542 3.7274 0.000139722 3.7929 0.000140222 3.8585 0.000140082 3.924 0.000140672 3.9895 0.000140812 4.0551 0.000141492 4.1206 0.000141742 4.1861 0.000142162 4.2517 0.000142812 4.3172 0.000143412 4.3828 0.000143332 4.4483 0.000143962 4.5138 0.000144252 4.5794 0.000145062 4.6449 0.000145252 4.7104 0.000145522 4.776 0.000145562 4.8415 0.000145862 4.907 0.000146352 4.9726 0.000146852 5.0381 0.000147302 5.1036 0.000147442 5.1692 0.000147412 5.2675 0.000147772 5.3986 0.000148852 5.5296 0.000149202 5.6607 0.000149562 5.7918 0.000150212 5.9228 0.000150772 6.0539 0.000151702 6.185 0.000152362 6.3161 0.000152902 6.4471 0.000153962 6.5782 0.000154482 6.7093 0.000155302 6.8404 0.000155992 6.9714 0.000156382 7.1025 0.000156912 7.2336 0.000157812 7.3646 0.000157812 7.4957 0.000158322 7.6268 0.000158672 7.7579 0.000159542 7.8889 0.000160032 8.02 0.000160452 8.1511 0.000160762 8.2821 0.000161172 8.4132 0.000161612 8.5443 0.000162522 8.6754 0.000163232 8.8064 0.000163652 8.9375 0.000164692 9.0686 0.000164442 9.1996 0.000165192 9.3307 0.000165422 9.4618 0.000166042 9.5929 0.000166552 9.7239 0.000166922 9.855 0.000167672 9.9861 0.000168052 10.117 0.000168142 10.248 0.000168782 10.379 0.000169182 10.576 0.000169402 10.838 0.000170732 11.1 0.000171432 11.362 0.000172402 11.624 0.000172982 11.887 0.000174122 12.149 0.000175252 12.411 0.000176212 12.673 0.000176622 12.935 0.000177632 13.197 0.000178142 13.459 0.000179092 13.722 0.000180022 13.984 0.000180822 14.246 0.000181232 14.508 0.000182482 14.77 0.000183502 15.032 0.000183952 15.294 0.000184232 15.557 0.000184812 15.819 0.000185742 16.081 0.000186482 16.343 0.000187632 16.605 0.000187862 16.867 0.000188532 17.13 0.000189542 17.392 0.000189912 17.654 0.000190542 17.916 0.000191252 18.178 0.000192012 18.44 0.000192412 18.702 0.000193522 18.965 0.000194182 19.227 0.000194602 19.489 0.000195212 19.751 0.000195542 20.013 0.000196232 20.275 0.000197042 20.537 0.000197822 20.8 0.000198622 21.193 0.000199112 21.717 0.000200422 22.241 0.000201362 22.766 0.000202302 23.29 0.000203182 23.814 0.000204352 24.338 0.000205152 24.863 0.000206302 25.387 0.000207342 25.911 0.000208472 26.436 0.000209302 26.96 0.000210492 27.484 0.000211472 28.008 0.000212252 28.533 0.000213092 29.057 0.000214092 29.581 0.000214902 30.106 0.000215752 30.63 0.000216782 31.154 0.000217222 31.678 0.000218512 32.203 0.000219112 32.727 0.000219912 33.251 0.000221092 33.776 0.000221572 34.3 0.000222252 34.824 0.000222642 35.349 0.000223532 35.873 0.000224582 36.397 0.000224982 36.921 0.000225902 37.446 0.000226352 37.97 0.000227212 38.494 0.000228032 39.019 0.000228482 39.543 0.000229422 40.067 0.000229702 40.591 0.000230762 41.116 0.000231772 41.64 0.000232482 42.426 0.000233302 43.475 0.000234632 44.524 0.000235912 45.572 0.000237822 46.621 0.000239482 47.669 0.000240812 48.718 0.000242072 49.766 0.000243562 50.815 0.000245142 51.864 0.000246362 52.912 0.000247272 53.961 0.000248652 55.009 0.000250042 56.058 0.000251122 57.106 0.000252522 58.155 0.000253602 59.204 0.000254502 60.252 0.000255732 61.301 0.000256822 62.349 0.000258162 63.398 0.000258982 64.446 0.000260202 65.495 0.000261162 66.544 0.000262312 67.592 0.000263522 68.641 0.000264442 69.689 0.000265182 70.738 0.000266372 71.787 0.000267342 72.835 0.000268222 73.884 0.000269232 74.932 0.000270142 75.981 0.000271652 77.029 0.000272442 78.078 0.000273402 79.127 0.000274682 80.175 0.000275302 81.224 0.000276292 82.272 0.000277062 83.321 0.000277972 84.894 0.000279472 86.991 0.000281492 89.088 0.000282762 91.185 0.000284712 93.282 0.000286262 95.379 0.000287832 97.477 0.000290132 99.574 0.000291762 101.67 0.000293202 103.77 0.000294772 105.87 0.000296532 107.96 0.000298432 110.06 0.000299902 112.16 0.000301182 114.25 0.000302792 116.35 0.000303942 118.45 0.000305392 120.55 0.000306842 122.64 0.000308512 124.74 0.000310802 126.84 0.000312682 128.93 0.000314502 131.03 0.000316192 133.13 0.000317592 135.23 0.000318682 137.32 0.000319772 139.42 0.000321362 141.52 0.000323072 143.61 0.000324872 145.71 0.000326172 147.81 0.000327602 149.91 0.000328942 152 0.000330632 154.1 0.000331762 156.2 0.000333352 158.29 0.000334452 160.39 0.000335872 162.49 0.000337132 164.59 0.000338042 166.68 0.000339132 169.83 0.000340852 174.02 0.000343242 178.22 0.000346512 182.41 0.000349862 186.61 0.000352962 190.8 0.000355142 194.99 0.000357902 199.19 0.000359802 203.38 0.000362052 207.58 0.000364642 211.77 0.000366472 215.97 0.000368322 220.16 0.000370292 224.35 0.000372702 228.55 0.000374762 232.74 0.000376552 236.94 0.000378322 241.13 0.000380132 245.33 0.000382192 249.52 0.000384632 253.71 0.000386622 257.91 0.000388572 262.1 0.000390492 266.3 0.000392202 270.49 0.000394932 274.69 0.000397562 278.88 0.000399472 283.07 0.000400902 287.27 0.000403152 291.46 0.000404792 295.66 0.000406292 299.85 0.000408122 304.05 0.000410002 308.24 0.000411872 312.43 0.000413952 316.63 0.000415832 320.82 0.000417942 325.02 0.000419562 329.21 0.000421632 333.41 0.000424302 339.7 0.000426592 348.09 0.000429652 356.47 0.000433322 364.86 0.000436712 373.25 0.000439882 381.64 0.000443852 390.03 0.000447302 398.42 0.000450252 406.81 0.000452952 415.2 0.000455762 423.58 0.000457312 431.97 0.000460302 440.36 0.000463662 448.75 0.000466432 457.14 0.000470232 465.53 0.000473722 473.92 0.000477042 482.3 0.000479922 490.69 0.000482332 499.08 0.000485322 507.47 0.000486972 515.86 0.000489302 524.25 0.000492742 532.64 0.000495012 541.02 0.000497332 549.41 0.000500812 557.8 0.000503172 566.19 0.000505812 574.58 0.000508142 582.97 0.000510362 591.36 0.000513092 591.36 0.000513592
Thank you very much for quick response! Please see above for the data
Thank you very much for quick response! please see above chat history for the data.
Calling @Rick_SAS
Did you mistype the third term in the model? The function form of b*[1-exp(-x/c)] is the same as for d*[1-exp(-x/e)], so it doesn't make sense to include the expression twice.
Here is the code to model the data using PROC NLIN. You can easily modify the code to include additional terms, if necessary:
/* least squares fit of parameters */
proc nlin data=Have /* sometimes the NOHALVE option is useful */
outest=Want(where=(_TYPE_="FINAL"));
parms a 0 b 1 c 1 f 1;
bounds c > 0;
model y = a + b*(1-exp(-x/c)) + f*x;
output out=Out P=Pred;
run;
proc print data=Want;run;
title "Data and Fitted Curve";
proc sgplot data=Out;
scatter x=x y=y;
series x=x y=Pred;
run;
This is a bit hard to fit (expand the Taylor series, and you will see why) You need to proceed with pretty good starting values. Do it in stages:
/* Get starting values for a and f */
proc reg data=have;
model y = x;
run;
/* Get starting values for a, f, b and c */
proc nlin data=have;
parms a = 1.34e-4 f = 8.5e-7 b = 0 c = 1;
model y = a + b*(1-exp(-x/c)) + f*x;
run;
/* Fit whole model */
proc nlin data=have plots=fitplot;
parms a = 8.8e-5 f = 5.3e-7 b = 1.5e-4 d = 0 c = 14.1 e = 1;
model y = a + b*(1-exp(-x/c)) + d*(1-exp(-x/e)) + f*x;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.