BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
samkelomotsa
Fluorite | Level 6

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;

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @samkelomotsa,

 

With my SAS 9.4 (TS1M5) using SAS/STAT 14.3 your code example works. Your error message suggests that you are using an older SAS/STAT version, perhaps 13.2 or 14.1, because the ESTIMATE statement of PROC NLIN was introduced in SAS/STAT 14.2 (which has been available since November 2016).

 

You can see the version number at the top of your SAS log. Also, PROC PRODUCT_STATUS writes the information to the log:

proc product_status;
run;

If it shows a version number <=14.1 for SAS/STAT, you will need a software update to make the ESTIMATE statement available.

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hello @samkelomotsa,

 

With my SAS 9.4 (TS1M5) using SAS/STAT 14.3 your code example works. Your error message suggests that you are using an older SAS/STAT version, perhaps 13.2 or 14.1, because the ESTIMATE statement of PROC NLIN was introduced in SAS/STAT 14.2 (which has been available since November 2016).

 

You can see the version number at the top of your SAS log. Also, PROC PRODUCT_STATUS writes the information to the log:

proc product_status;
run;

If it shows a version number <=14.1 for SAS/STAT, you will need a software update to make the ESTIMATE statement available.

samkelomotsa
Fluorite | Level 6

Thank you. Let me update my software. I hope it won't affect my licence.

 

This is my version

For SAS/STAT ...
Custom version information: 14.1

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 428 views
  • 1 like
  • 2 in conversation