| Date: | Fri, 20 Jun 2008 23:25:10 GMT |
| Reply-To: | "jiana via MathKB.com" <u44208@UWE.UGA.EDU> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "jiana via MathKB.com" <u44208@UWE.UGA.EDU> |
| Subject: | Re: Means table using Proc Report |
|
| Content-Type: | text/plain; charset="utf-8" |
What an elegant solution. After checking back over several and finding no
repsonses (I'm new to the group and have not figured out how to see complete
thread), I worked 2 days, wrote over 300 lines of code and was finally able
to generate the table. You demonstrated how simple this was. Thank you.
data _null_, wrote:
>I like this a little better. I believe it is more similar to the OPs
>original need.
>
>title 'Balanced Data from Randomized Complete Block';
>data plants;
> input Type $ @;
> do Block = 1 to 3;
> input StemLength @;
> Stem2 = StemLength+rannor(12345)*4.1;
> Stem3 = StemLength+rannor(12335)*.4;
> output;
> end;
> datalines;
>Clarion 32.7 32.3 31.5
>Clinton 32.1 29.7 29.1
>Knox 35.7 35.9 33.1
>O'Neill 36.0 34.2 31.2
>Compost 31.8 28.0 29.2
>Wabash 38.2 37.8 31.9
>Webster 32.5 31.1 29.7
>;;;;
> run;
>
>ods output mclines=mclines;
>proc glm order=data;
> class Block Type;
> model Stem: = Block Type / solution;
> means Type / waller regwq;
> run;
> quit;
>data work.mclines2;
> set work.mclines(where=(mean ne ._));
> array line[*] line:;
> call sortC(of line[*]);
> length line0 $8;
> line0 = lowcase(cats(of line[*]));
> if _n_ eq 1 then call symputX('F',cats('$F',dim(line),'.'));
> run;
>proc report nowd list headline data=work.mclines2;
> column level method,dependent,(mean line0) necessaryEvil;
> define level / group;
> define method / across 'Method' '--';
> define dependent / across 'Dependent' '--';
> define mean / sum ' ' format=6.3;
> define line0 / display ' ' format=&f;
> define necessaryEvil / noprint;
> compute after;
> line 'Means with the same letter are not significantly different.';
> endcomp;
> run;
>
>> I found data in the examples that should be pretty close to yours.
>> This may be something like you need.
>[quoted text clipped - 58 lines]
>> > I can get everything except the significance (charcter data). Is this even
>> > possible?
--
Message posted via http://www.mathkb.com
|