Programming the statistical procedures from SAS

Proc GENMOD for three ordinal variables using log linear model

Reply
New Contributor
Posts: 3

Proc GENMOD for three ordinal variables using log linear model

hallo, can you help me guys?

i am trying to analyze three ordinal variables using log linear model.. but i cant find the genmod procedure for three ordinal variables.. i've been try using the genmod proc for two ordinal variables and changed the model, but the there was missing value..

below is my procedure:

data tugasadk;
input x$ y$ z$ u v w count  @@;
datalines;

 

proc genmod data=tugasadk rorder=data;
class x y z;
model count = x y z/ dist=poi
link=log lrci type3 obstats;
title 'independen model 1 ';
run;

 

proc genmod data=tugasadk order=data;
class x y z ;
model count = x y z u*v x*z y*z /dist=poi
link=log lrci type3 obstats;
title 'linear by linear association 1';
run;

can you show me the right procedure? thank you..

Grand Advisor
Posts: 9,458

Re: Proc GENMOD for three ordinal variables using log linear model

[ Edited ]

You are building Possion Regression, Not Log Linear Model.

Log Linear Model is for Contingency/Freq Table . In other words, you need use PROC CATMOD .

 

 

 

proc catmod data=bartlett;
weight count;
model x*y*z*u*v*w=_response_ / noparm pred=freq;
loglin x|y|z|u|v|w @ 2;
quit;

 

New Contributor
Posts: 3

Re: Proc GENMOD for three ordinal variables using log linear model

thank you very much for the reply, but from three ordinal variables i've made the contingency table..

is that still use poisson regression?

Grand Advisor
Posts: 9,458

Re: Proc GENMOD for three ordinal variables using log linear model

No. It totally different another Model. It split the COUNT into three variables way .
New Contributor
Posts: 3

Re: Proc GENMOD for three ordinal variables using log linear model

I've tried the procedure from you, but the next problem is still confuse how i know the best model, how to read the output.. can you help me once again?

thanks you very much for your helping.. 

Grand Advisor
Posts: 9,458

Re: Proc GENMOD for three ordinal variables using log linear model

Sorry. I am not expert about PROC CATMOD. But you can read documentation, there are many example in it you can refer to.

"how i know the best model, how to read the output.. "
Check ANOVA, if some variables are not significant ,you can drop them from the model.
Can you post the output? I don't know if I could explain it .

Ask a Question
Discussion stats
  • 5 replies
  • 232 views
  • 1 like
  • 2 in conversation