BookmarkSubscribeRSS Feed
OldSASGuy100
Fluorite | Level 6

Hello group:

 

I'm trying something new here and running into the usual programming snafu.

 

step 1 - use proc surveyselect to create several replicates of a dataset

 

step2 - use proc glm and ods to obtain a file of parameter estimates. Here's the code which works without the "by" clause.

 

ODS trace on;
ods output glm.anova.t2pcl_total.ParameterEstimates=foo.bar1;
proc glm data=boot1 outstat=foo.bar;
class cage (ref=first) ceduca (ref=last) cincome crace sex (ref=first);
model t2pcl_total = sex cage ceduca cincome crace /*_INTO_*/ overall_score /solution;
weight tot_weight;
by replicate; /* works without this on a single file */
run;
ods trace off;

 

When computing one file the output "glm.anova.t2pcl_total.ParameterEstimates" gets created just fine but with multiple

replicates it creates a path like "glm.bygroup3.anova.t2pcl_total.ParameterEstimates" - this is clear from the trace in the

attached log file. See error message in attached file also.

 

I'm thinking the answer might lie in macro programming but that's just a guess. Any help greatly appreciated.

 

Thanks,

OldSASguy100

 

 

 

 

2 REPLIES 2
PGStats
Opal | Level 21

Just use

 

ods output ParameterEstimates=foo.bar1;

 

and everything, including the by variable, will be output to foo.bar1.

PG
OldSASGuy100
Fluorite | Level 6
Thanks, worked like a charm.

##- Please type your reply above this line. Simple formatting, no
attachments. -##

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 1298 views
  • 2 likes
  • 2 in conversation