From: Tom Abernathy on
On Feb 25, 9:23 am, clown...(a)HOTMAIL.COM (Adam) wrote:
> Thank you Jerry and "Data _null_;" for your suggestions.  I've had an
> opportunity to investigate both of your solutions/hints and this mostly
> handles my issue.  I now realize, however, that I may have been a little too
> specific in my original posting -- to generalize my problem, suppose that
> PROC MIXED is not necessarily my starting point.  Suppose that I began with
> a table of p-values for multiple comparisons (perhaps proportions would be a
> better example) and that from that table of p-values I have created the table:
>
> table6:
> dependent Prop Eqp1 Eqp2 Eqp3 Eqp4 Eqp5 Eqp6
> p1        0.57 1    1    0    0    0    0
> p2        0.56 1    1    0    0    0    0
> p3        0.54 0    0    1    1    0    0
> p4        0.53 0    0    1    1    1    0
> p5        0.51 0    0    0    1    1    0
> p6        0.47 0    0    0    0    0    1
>
> with the goal of producing this table:
>
> table7:
> LINE1 LINE2 LINE3 LINE4 prop Mean Eqp1 Eqp2 Eqp3 Eqp4 Eqp5 Eqp6
> A                       p1   0.57 1    1    0    0    0    0
> A                       p2   0.56 1    1    0    0    0    0
>       B                 p3   0.54 0    0    1    1    0    0
>       B     C           p4   0.53 0    0    1    1    1    0
>             C           p5   0.51 0    0    0    1    1    0
>                   D     p6   0.47 0    0    0    0    0    1

Sorry if I am showing my statistical ignorance, but do you have a
table that is just the first 5 columns of table 7? Or a stream of
text that you can parse to get it? Otherwise how do you know that P2
is for LINE1=A and not for LINE2=B?
From: "Data _null_;" on
On 2/25/10, Adam <clown_rt(a)hotmail.com> wrote:
> Suppose that I began with
> a table of p-values for multiple comparisons (perhaps proportions would be a
> better example) and that from that table of p-values I have created the table:
>
> table6:
> dependent Prop Eqp1 Eqp2 Eqp3 Eqp4 Eqp5 Eqp6
> p1 0.57 1 1 0 0 0 0
> p2 0.56 1 1 0 0 0 0
> p3 0.54 0 0 1 1 0 0
> p4 0.53 0 0 1 1 1 0
> p5 0.51 0 0 0 1 1 0
> p6 0.47 0 0 0 0 0 1

If you are willing to modify this slightly to look more like the
output from GLM then PDGLM800 will do this nicely.

/* the input to PDGLM800 must conform to GLM ODS output */
data
lsm(keep=effect dependent e lsmean lsmeanNumber)
dif(keep=effect dependent rowName _:)
;
retain Effect 'E' Dependent 'Y';
input E $ LSMean _1-_6;
rowname = put(_n_,4.-r); *odd but true;
lsmeanNumber = _n_;
cards;
p1 5.7 1 1 0 0 0 0
p2 5.6 1 1 0 0 0 0
p3 5.4 0 0 1 1 0 0
p4 5.3 0 0 1 1 1 0
p5 5.1 0 0 0 1 1 0
p6 4.7 0 0 0 0 0 1
;;;;
run;
proc print data=lsm;
proc print data=dif;
run;

/* Download PDGLM800 from here:
http://animalscience.ag.utk.edu/FacultyStaff/ArnoldSaxton.html */
%include '.\pdglm800.sas';

%pdglm800(dif,lsm,alpha=.05,sort=yes);


The output looks like this
Letter
Obs Dependent E LSMean Group
1 Y p1 5.7 A
2 Y p2 5.6 A
3 Y p3 5.4 B
4 Y p4 5.3 BC
5 Y p5 5.1 C
6 Y p6 4.7 D