BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello
I have a question : when my variable mean1 is numeric, there is not any problem and the reporting is OK :

ods rtf file="myway.rtf" startpage=yes;

proc report data=statdes split="~" Headline Headskip nowd;
column time group,( mean1 );
define time /group id ;
define group /across ;
run;

ods rtf close;

but if the variable mean1 is character, the following error message appears in log :
ERROR: There is no statistic associated with mean1.

so how can i solve this problem ?
Do you have any ideas ?
Thank you for your help and devices.
9 REPLIES 9
deleted_user
Not applicable
Hello,
Looking on syntax in column statement, I suppose you want to sum mean1 for each value of group.
deleted_user
Not applicable
No, vasile, want i want to do is only to easily displayed my datas when my variabme mean1 is character
to quote an example this a dataset :

data statdes_;
do time=1 to 5;
group= "A"; value="276.20±6.56(N=10)";
output;
group= "B"; value="322.35±1.28(N=12)";
output;
group= "C"; value="441.26±8.53(N=8)";
output;
group= "D"; value="282.20±4.11(N=11)";
output;
end;
run;
and i want to display only with a proc report my datas for time in the first column and the character variable value for the 4 differents groups, so my question is that it's ok if my variable value is numeric but if my variable value is character as shown in this example, i try to find a way to display the datas so may be there is an option that i don't know ? or another way to obtain what i want..?
thank you for your help. 🙂

ods rtf file="myway.rtf" startpage=yes;

proc report data=statdes split="~" Headline Headskip nowd;
column time group,( value );
define time /group id ;
define group /across ;
run;

ods rtf close;
dschmeid
Calcite | Level 5
Montpe,

This may be a month too late, but try this:

data statdes_;
do time=1 to 5;
group= "A"; value="276.20±6.56(N=10)"; dummy=1;
output;
group= "B"; value="322.35±1.28(N=12)"; dummy=1;
output;
group= "C"; value="441.26±8.53(N=8)"; dummy=1;
output;
group= "D"; value="282.20±4.11(N=11)"; dummy=1;
output;
end;
run;

proc report data=statdes_ split="~" Headline Headskip nowd;
column time group,( value dummy);
define time /group id ;
define group /across ;
define dummy / analysis noprint;
run;

-David
Cynthia_sas
SAS Super FREQ
Hi:
In the PROC REPORT doc on the DEFINE statement, there is a section called "Interactions of Usage and Position" or "Interactions of Position and Usage" that has a table showing which how different types of variables work together (Across, Display, Order, etc)....
I'm pretty sure there's a note there about having DISPLAY variables with ACROSS (when you define MEAN1 as a character variable -- it's essentially a DISPLAY variable), then I believe that's the situation you're in. Generally, an ACROSS report is a summary report and it's very hard to summarize a character variable.

cynthia
deleted_user
Not applicable
Thanks for clarification.
deleted_user
Not applicable
thank you cynthia for your answer, but in fact what i want to do is not to summarize a character variable but only to display it using an across variable.
Cynthia_sas
SAS Super FREQ
Hi:
In particular, look at this note at the bottom of the table on page 936:

*When a display variable and an across variable share a column, the report must also contain another variable that is
not in the same column.


cynthia
deleted_user
Not applicable
thank you dschmeid (your name is not really easy to write 🙂 )

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 1659 views
  • 0 likes
  • 3 in conversation