b) This one is more elegant. Transpose the variables of interest into one column as follows:
Proc transpose data = XXXX out = XXXX1 name = var;
var var1 var2 var3;
Proc means data = XXXX1;
This is useful if you want sets of means for different classes for example age, height, weight, etc for genders, etc.
3 Proc Univariate, etc: As in 2a) above, specify a set of procedures with one variable in each, with the variable name in a Title statement. Again possibly specifying sheet_interval = “None” to get them all in one spreadsheet.
4 Proc Lifetest: The only solution I have here is to copy the:
Summary of the Number of Censored and Uncensored Values
table given at the end of the output into the beginning of the sheet and then cut and paste every class level’s row into the top of that level’s output.
I would appreciate it if someone with more expertise in programming tagsets than myself, could address these problems.
> 2 Proc Means: Here I have two options namely:
> a) Specify a set of one-variable Proc Means and give
> the the variable analysed in a Title statement. If you
> want them all in one spreadsheet, specify:
> ods markup tagset = Excelxp options (sheet_interval =
> as an option for the first Proc Means.
> b) This one is more elegant. Transpose the variables
> s of interest into one column .....
another approach for this proc was offered by Myra Oltsik (and some old hack ;-) )This approach makes just a single pass through the data. It is described in the paper at http://www2.sas.com/proceedings/sugi31/059-31.pdf Paper 059-31 : A Better Means ? The ODS Data Trap
> another approach for this proc was offered by Myra
> Oltsik (and some old hack ;-) )This approach makes
> just a single pass through the data. It is described
> in the paper at
> Paper 059-31 : A Better Means ? The ODS Data Trap
Be careful if you expect two-tailed CLMs. The macro can only produce one-tail CLM, even when you ask for both.
those authors probably have to insert a caveat about this issue on any future release.
Of course, the technique in the macro referred, could be entirely replaced with /autoname and a reconstruction of the names into and out of autoname handling (to avoid trying to squeeze a column name and statistic name within a 32 width limit when nothing stops an input name being too wide for the squeeze). those authors will have to confer.
That's how I do it. I do have to figure out how may variables are in the VAR list. That can be a bit tricky if you want to have a program that has same default as PROC MEANS, to analyze all numeric VARS not mentioned elsewhere.
I have just downloaded and tested the latest V1.114 Excelxp tagset and none of my problems mentioned above had been addressed. Crosstab tables are still empty; multiple variables in proc means still appear in one row; and multiple variables in proc univariate are not identified. Pity.
Thank you Cynthia
to package a demo, I finally made sure to re-create the style within my process. Hey-presto! no longer a question of doubt!
I had jumped to the wrong assumption - end up with "egg on face".
My routines no longer differ between 1.86 and 1.114 and neither do the results!
Nothing to do now but apologise to any who thought I was offering a reason not to adopt the new version. Sorry. ....
Version 1.116 should be on the web soon. It has been submitted and there are no holdups before it can be published on the web.
This version fixes a problem with footnotes going missing in rare cases, and it turns on stacked columns so that proc means will now stack it's values, it also fixes the problem of missing values with Freq crosstabs at SAS 9.2.
Univariate will still not identify multiple variables because the tagset still does not support proc titles. Supporting proc titles is a major undertaking at this point and is unlikely to happen before we have support for Excel 2007-2010.