Date: Sun, 15 Jun 2008 17:01:09 -0500
Reply-To: "data _null_," <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_," <datanull@GMAIL.COM>
Subject: Re: Means table using Proc Report
In-Reply-To: <7367b4e20806140624y3ff72165p62984905a7f48b2c@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
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;
On 6/14/08, data _null_, <datanull@gmail.com> wrote:
> I found data in the examples that should be pretty close to yours.
> This may be something like you 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 trace on;
> ods output mclines=mclines mclinesinfo=mclinesinfo;
> proc glm order=data;
> class Block Type;
> model Stem: = Block Type / solution;
> means Type / waller regwq;
> run;
> quit;
> ods trace off;
>
> proc print data=mclines;
> run;
> proc report nowd list headline data=work.mclines(where=(mean ne ._));
> column level method,dependent,(mean line:) necessaryEvil;
> define level / group;
> define method / across 'Method' '--';
> define dependent / across 'Dependent' '--';
> define mean / sum ' ' format=6.3;
> define line: / display ' ' spacing=0;
> define line1 / spacing=1;
> define necessaryEvil / noprint;
> run;
>
>
> On 6/13/08, jiana <u44208@uwe.uga.edu> wrote:
> > Can Proc Report create a table means like the following:
> >
> > sample1 sample2 sample3
> > v1 acidity 5.7 C 6.7 A 6.6 BA
> > v2 solids 6.3 DC 6.6 BA 6.7 A
> > v3 dice 5.5 C 6.6 A 6.6 A
> > v4 color 4.5 D 5.1 BC 5.2 BAC
> >
> > My input file contains attribute codes (v1--v4), names (acidity--color),
> > sample id (sample1--sample3),
> > means and significance. These were captured from output of Duncan's test in
> > Proc Glm.
> >
> > I can get everything except the significance (charcter data). Is this even
> > possible?
> >
>
|