From: "Data _null_;" on
I think you need SLICE option in LSMEANS statement.

proc plan seed=1085055439;
factors ID=50 ordered
Faculty = 1 of 4
Gender = 1 of 2
y = 1 of 50
/ noprint;
output out=plan
Faculty cvals=('Arts' 'Engineering' 'Medical' 'Science')
Gender cvals=('Male' 'Female')
;
run;
quit;
proc print;
run;

proc glm data=plan;
class Faculty Gender;
model y=faculty gender faculty*gender;
lsmeans faculty*gender / slice=Faculty;
run;
quit;


On 11/11/09, Madan Kundu <madan4331(a)yahoo.co.in> wrote:
> Hi,
>
> I have following two factors in my GLM.
> Faculty: Arts Engineering Medical Science
> Gender: Male Female
>
> I want to test:
> Ho: Difference between male and female in Arts = Differene between male and female in Science
>
> I guess I need to use Contrast or Estimate statement in SAS. Please let me know what to specify in Contrast or Estimate statement.
>
> I have my PROC GLM code as follows:
> proc glm data=mydata;
> class Faculty Gender;
> model y=faculty gender faculty*gender;
> run;
>
> Thanks & Regards
> Madan Gopal Kundu
>
>
>
> Yahoo! India has a new look. Take a sneak peek http://in.yahoo.com/trynew
>
From: Robin R High on
Madan,

One of many situations where MIXED and esp. GLIMMIX (9.2) work so much
better than GLM.


ods output diffs=dfs;
ods exclude diffs;

proc mixed data=mydata;
class Faculty Gender;
model y=faculty gender faculty*gender;
lsmeans faculty*gender / diffs slice=faculty ;
run;

proc print data=dfs NOObs;
where faculty = _faculty;
var faculty gender _gender Estimate StdErr DF tValue Probt;
run;

ods select tests3 slices lsmeans slicediffs;

proc GLIMMIX data=mydata;
class Faculty Gender;
model y=faculty gender faculty*gender;
lsmeans faculty*gender / slice=faculty slicediff=faculty;
run;


Robin High
UNMC






From:
Madan Kundu <madan4331(a)YAHOO.CO.IN>
To:
SAS-L(a)LISTSERV.UGA.EDU
Date:
11/11/2009 11:58 PM
Subject:
PROC GLM: Contrast/Estimate
Sent by:
"SAS(r) Discussion" <SAS-L(a)LISTSERV.UGA.EDU>



Hi,

I have following two factors in my GLM.
Faculty: Arts Engineering Medical Science
Gender: Male Female

I want to test:
Ho: Difference between male and female in Arts = Differene between male
and female in Science

I guess I need to use Contrast or Estimate statement in SAS. Please let
me know what to specify in Contrast or Estimate statement.

I have my PROC GLM code as follows:
proc glm data=mydata;
class Faculty Gender;
model y=faculty gender faculty*gender;
run;

Thanks & Regards
Madan Gopal Kundu



Yahoo! India has a new look. Take a sneak peek
http://in.yahoo.com/trynew
 | 
Pages: 1
Prev: FSEdit Question
Next: varying y-interval/scale