Answer:
some practice of template since 8.2
and logic
as ods trace was giving
Post by Huang, Ya-------------
Name: VarInformation
Label: Variables Information
Template: base.corr.VarInfo
Path: Corr.VarInformation
-------------
-------------
Name: SimpleStats
Label: Simple Statistics
Template: base.corr.UniStat
Path: Corr.SimpleStats
-------------
-------------
Name: PearsonCorr
Label: Pearson Correlations
Template: base.corr.StackedMatrix
Path: Corr.PearsonCorr
and as the pearson correlation was thr third subpart of the output
i went to the template usind odst command
where i search for something near base.corr.StackedMatrix
so i found
proc
template;
define table
Common.StackedMatrix;
notes "Stacked Matrix template definition.";
.................................;
with no format at all
but with many references to
parent = common.column.matrix;
i open matrix template and read
Post by Huang, Yaproc
template;
define column
Common.Column.Matrix;
notes "Default matrix contents
column";
dynamic csplit id cmwidth cmxwidth
fuzz;
define header
t;
text
_label_;
split =
csplit;
end;
fuzz =
fuzz;
width_max =
cmxwidth;
width =
cmwidth;
just =
r;
header =
t;
id =
id;
generic;
end;
run;
i try to add format= before the end; and before generic!
now to remain in a situation of exploring and not building a definitive
work contexte=
i add prior
libname tpl "d:\ods92";
*ods path sasuser.templat(update) sashelp.tmplmst(read);
ods path tpl.templat(update) sashelp.tmplmst(read);
this manner of doing IS NOT WORKING for print report and tabulate where
the style is to be included inside the sas code
as there are no template for those procedures
HTH
Andre
Post by Huang, YaAndre,
Exactly what I was looking for. I changed the format to produce the OP's
original desire to have 2 decimal places but, of course, wouldn't have even
considered the possibility were it not for your and Ya's posts.
Where did you find the needed information?
Art
libname tpl "c:\";
ods path tpl.templat(update) sashelp.tmplmst(read);
proc template;
edit base.corr.UniStat;
edit Mean;
format = 8.2;
end;
edit StdDev;
format = 8.2;
end;
edit Min;
format = 8.2;
end;
define Max;
format = 8.2;
end;
end;
define column Common.Column.Matrix;
notes "Default matrix contents column";
dynamic csplit id cmwidth cmxwidth fuzz;
define header t;
text _label_;
split = csplit;
end;
fuzz = fuzz;
width_max = cmxwidth;
width = cmwidth;
just = l;
header = t;
id = id;
format = 6.2;
generic;
end;
run;
proc corr data=sashelp.class;
var weight height;
run;
---------
Post by Andre WielkiArt and Ya
the object is different
libname tpl "d:\ods92";
*ods path sasuser.templat(update) sashelp.tmplmst(read);
ods path tpl.templat(update) sashelp.tmplmst(read);
proc
template;
define column
Common.Column.Matrix;
notes "Default matrix contents
column";
dynamic csplit id cmwidth cmxwidth
fuzz;
define header
t;
text
_label_;
split =
csplit;
end;
fuzz =
fuzz;
width_max =
cmxwidth;
width =
cmwidth;
just =
l;
header =
t;
id = id;
format = date9.;
generic;
end;
run;
proc corr data=sashelp.class;
var weight age;
run;
HTH
Andre
Hi Art,
Use ods trace on, we can find the table template used for specific
section
of the output. That's how I get the name of "base.corr.UniStat".
For pvlaue, it seems to trace back to "common.pvalue".
-------------
Name: PearsonCorr
Label: Pearson Correlations
Template: base.corr.StackedMatrix
Path: Corr.PearsonCorr
ods trace on;
ods path sasuser.templat(update) sashelp.tmplmst(read);
proc template;
define column Common.PValue;
notes "Default p-value column";
just = r;
format = date.;
end;
run;
proc corr data=sashelp.class;
var weight age;
run;
But it didn't. I have to play a bit more :-)
-----Original Message-----
Sent: Tuesday, October 06, 2009 3:12 PM
Subject: Re: Can I specify 2 decimal digits in proc corr?
Ya,
Thanks! I didn't know that.
And, after reading your post, I discovered that one can type ODST in the
command line and see all of the things that are set in the various
templates.
However, I couldn't find how one could change the format of the
correlations or pvalues in the matrix that is output by proc corr. Do
you (or anyone) know how that might be accomplished?
Art
---------
Post by Ya Huangods path sasuser.templat(update) sashelp.tmplmst(read);
proc template;
edit base.corr.UniStat;
edit Mean;
format = 8.2;
end;
edit StdDev;
format = 8.2;
end;
edit Min;
format = 8.2;
end;
define Max;
format = 8.2;
end;
end;
run;
proc corr data=sashelp.class;
var weight height;
run;
Simple Statistics
Variable N Mean Std Dev Sum
Minimum Maximum
Weight 19 100.03 22.77 1901
50.50 150.00
Height 19 62.34 5.13 1184
51.30 72.00
Post by deminCan I specify 2 decimal digits in proc corr? or after output to excel,
I can change easily. Thanks.
--
Andrᅵ WIELKI
INED (Institut National d'Etudes Dᅵmographiques)
Service Informatique
133 Boulevard Davout 75980 Paris Cedex 20
--
André WIELKI
INED (Institut National d'Etudes Démographiques)
Service Informatique
133 Boulevard Davout 75980 Paris Cedex 20
mél : ***@ined.fr tél : 33 (0) 1 56 06 21 54