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

Hello,

 

I have been running Proc Surveyfreq using SAS 9.2. The code runs OK. However, now that I have SAS 9.4, running the same code generates errors. Here is the log:

 

 

247 proc surveyreg data = data1 ;

248   strata _ststr; *stratification variable;

249   cluster _psu; *first stage clustering variable;

250   weight _PWTAS;

251   class ageg;

252   model VART1 = ageg /noint solution clparm;

253   estimate 'rat56' ageg 0.128810 0.182648 0.219077 0.299194 0.170271;

254   ods output 'estimates' = ratt56(rename=(estimate=adj_pect lowrcl=adj_lcl uprcl=adj_ucl) keep=estimate lowrcl

254! uprcl);

255 run;

 

NOTE: In data set data1, total 1119 observations read, 126 observations with missing values or non-positive weights are omitted.

NOTE: The structure of the Estimates table has changed from an earlier release of SAS.

WARNING: Output ''estimates'' was not created. Make sure that the output object name, label, or path is spelled correctly.  Also, verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that the NOPRINT option is not used.

NOTE: PROCEDURE SURVEYREG used (Total process time):

      real time           0.47 seconds

      cpu time            0.26 seconds

 

 

 Thank you for your help,

 

Art    

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

The log contains 


NOTE: The structure of the Estimates table has changed from an earlier release of SAS.

 

Now you need

 

ods output Estimates = ratt56(rename=(estimate=adj_pect lower=adj_lcl upper=adj_ucl) keep=estimate lower upper);

 

 

PG

View solution in original post

7 REPLIES 7
ballardw
Super User

The note says the ESTIMATES results set may have change. I would try the code without any dataset options and see if the variable names have changed. Also, I don't think the procedure output table needs the quotes.

PGStats
Opal | Level 21

The log contains 


NOTE: The structure of the Estimates table has changed from an earlier release of SAS.

 

Now you need

 

ods output Estimates = ratt56(rename=(estimate=adj_pect lower=adj_lcl upper=adj_ucl) keep=estimate lower upper);

 

 

PG
ArtPsh
Fluorite | Level 6

Ballard & PGStats,

 

As you have suggested, output in the ODS statement does not need to be surrounded by single quotes.  Without the single quotes the new log from

 

ods output Estimates = ratt56(rename=(estimate=adj_pect lower=adj_lcl upper=adj_ucl) keep=estimate lower upper);

 

says:

NOTE: The structure of the Estimates table has changed from an earlier release of SAS.

WARNING: The variable lower in the DROP, KEEP, or RENAME list has never been referenced.

WARNING: The variable upper in the DROP, KEEP, or RENAME list has never been referenced.

WARNING: The variable lower in the DROP, KEEP, or RENAME list has never been referenced.

WARNING: The variable upper in the DROP, KEEP, or RENAME list has never been referenced.

 

I will need those variables as heading of the columns of the tables to be generated later.

Is there any SAS literature on KEEP/DROP within ODS Output?

 

Thanks,

 

Have a great weekend,

 

ArtPsh

PGStats
Opal | Level 21

You must include option CL in your ESTIMATE statement to get the LOWER and UPPER variables in ODS table Estimates.

PG
ArtPsh
Fluorite | Level 6

Hello PGStats,

 

It looks like you are pointing me to the right direction. I tried to include the CL options as follows:

ods output estimates = att156(rename=(estimate=adj_pct lowercl=adj_lcl uppercl=adj_ucl) keep=estimate lowercl

uppercl) / options = cl;

 

-

22

76

ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string (in lieu of / before options=cl).

ERROR 76-322: Syntax error, statement will be ignored.

416 run;

How do you correct that syntax error?

 

Thank you,

 

ArtPsh

 

PGStats
Opal | Level 21

Please read the documentation for the ESTIMATE statement.

 

estimate 'rat56' ageg 0.128810 0.182648 0.219077 0.299194 0.170271 / cl;

PG
ArtPsh
Fluorite | Level 6

Hi PGStats,

 

I spent my time yesterday reading some literature on Proc Surveyreg, Estimate statement and ODS Output statement. I was unable to solve the intriguing error messages. This morning, SAS Technical Support advised me to do the following:

"The table name for the parameter estimates is ParameterEstimates, so your ODS statement should be: 

ods output parameterestimates." Inserting ParameterEstimates afte ODS Output helped solve the problem.

 

Thank you for your input,

 

ArtPsh

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 7 replies
  • 2191 views
  • 0 likes
  • 3 in conversation