/* conclk.sas */ /* Example 9.6 -- simple nonlinear regression */ /* from Bates & Watts (1988, p41, Example BOD 1) */ /* */ option ls = 80 ; * easier to read output ; data a ; input x y ; cards ; 1 8.3 2 10.3 3 19.0 4 16.0 5 15.6 7 19.8 ; run ; /* */ /* write out the data */ proc print data=a ; title 'Example 9.6 -- Simple nonlinear regression' ; title2 'Bates & Watts Example BOD 1' ; run ; /* */ /* nonlinear regression */ proc nlin data=a ; model y = th1*( 1 - exp(-th2*x) ) ; * model gives mean function ; der.th1 = 1-exp(-th2*x) ; * gradient vector ; der.th2 = th1*x*exp( -th2*x ) ; parameters th1 = 20 th2 = 0.4 ; * initial values ; run ;