* SAS code to fit mercury data from Table 7.1; options linesize=70; data mercury; input hgconc y @@; x = log(hgconc); cards; 2.5 13.57 22 15.33 60 16.92 90 16.08 105 17.14 144 18.85 178 18.63 210 19.30 233 25.77 256 28.44 300 35.46 400 45.26 proc nlin method=marquardt; parameters g = 18.63 b = 38.88 t = 5.1818; if x <= t then do; *left plateau; model y = g ; der.g = 1; der.b = 0; der.t = 0; end; else do; *post-threshold; model y = g + b*(x-t); der.g = 1; der.b = x-t; der.t = -b; end; run;