Dear colleagues,
I am considering the following two -dimensional data:
Variable 2
1 2 3
___________________________________________
Variable 1 1 20 56 24
2 8 28 14
3 2 16 2
I would like to obtain the following main effects from a loglinear
model of independence:
ESTIMATED MAIN EFFECTS
_____________________________
Variable 1 Variable 2
LEVEL 1 u1(1)= 0.77 u2(1)= -0.50
2 u1(2)= 0.07 u2(2)= 0.71
3 u1(3)=-0.84 u2(3)= -0.21
I have tried to use the following SAS code but could not get the
the above results:
options ls=72 ps=75 nodate;
data try;
input var1 $ var2 $ count;
cards;
1 1 20
1 2 56
1 3 24
2 1 8
2 2 28
2 3 14
3 1 2
3 2 16
3 3 2
;
proc catmod data= try order=data;
weight count;
model var1*var2 = _response_ / noresponse ;
loglin var1 var2;
run;
From the code I get two tables; one for Maximum -likelihood
Analysis- of- variance and another for Analysis of Maximum -Likelihood
estimates .
If I include parm after noresponse in the model statement it will say
CATMOD running and keeps on doing that forever but I feel this is a
small dataset. I would also like to generalize the code to be
able to estimate the interaction effects for the combination of one
level of a factor with that of the other factor.
Some assistance please!
Yours sincerely,
June E. Simakani(Mr)
Department of Statistics
University of Transkei
E-mail: [log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|