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:

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

class x y z;
model count = x y z/ dist=poi
title 'independen model 1 ';
run;

class x y z ;
model count = x y z u*v x*z y*z /dist=poi
title 'linear by linear association 1';
run;

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

Super User
Posts: 10,213

## 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?

Super User
Posts: 10,213

## 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..

Super User
Posts: 10,213

## 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 .

```
Discussion stats
• 5 replies
• 290 views
• 1 like
• 2 in conversation