USING THE CODE ALREADY POSTED IN SUNFLOWER EXAMPLE. I HAVE A PROBLEM THE ESTIMATE STATEMENT OR LINE IS NOT WORKING AS IT GIVES AN ERROR "ERROR 180-322: Statement is not valid or it is used out of proper order." WHAT COULD BE THE PROBLEM? I HAVE TRIED SHIFTING THE ESTIMATE LINE TO BE BEFORE THE OUTPUT STATEMENT, STILL IT FAILS. /* Mean heights of 58 sunflowers: Reed, H. S. and Holland, R. H. (1919), "Growth of sunflower seeds" Proceedings of the National Academy of Sciences, volume 5, p. 140. http://www.pnas.org/content/pnas/5/4/135.full.pdf */ data Sunflower; input Time Height; label Time = "Time (days)" Height="Sunflower Height (cm)"; datalines; 7 17.93 14 36.36 21 67.76 28 98.1 35 131 42 169.5 49 205.5 56 228.3 63 247.1 70 250.5 77 253.8 84 254.5 ; proc nlin data=Sunflower list noitprint; parms K 250 r 1 b 40; /* initial guess */ model Height = K / (1 + exp(-r*(Time - b))); /* model to fit; Height and Time are variables in data */ output out=ModelOut predicted=Pred lclm=Lower95 uclm=Upper95; estimate 'Dt' log(81) / r; /* optional: estimate function of parameters */ run;
... View more