BookmarkSubscribeRSS Feed
Mathis1
Quartz | Level 8

Hi, 

I was wondering if there is a way to estimate a multiplicative model on SAS.
For instance, a model like this :

Y = (B1.X1) * (B2.X2) * (B3.X3) 

where the B's are the estimated coefficients of the categorical X's variables.

 

 

4 REPLIES 4
SteveDenham
Jade | Level 19

A log-linear model is most appropriate here.  Check out the PROC CATMOD documentation here for a very close approximation to the situation you present:

 

https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_catmod_examples04.htm&docsetVersi... 

 

SteveDenham

SteveDenham
Jade | Level 19

You could also use either PROC GENMOD or GLIMMIX with a log link.  It depends on which provides the most interpretable output.  The CATMOD approach is probably the standard, though.

 

SteveDenham

Mathis1
Quartz | Level 8

Hello @SteveDenham ,

I'm very grateful to you for your reply. I'm not sure how to use the PROC Catmod in my case. I tried :

proc catmod data=PACIFICA.PACIFICA_04_V8;
model Y= X1*X2*X3;
quit;

But it doen't seem to give me any coefficient, only the response profiles... I also tried some other options that I read here and there but no success 😞

Any advice ?

 

SteveDenham
Jade | Level 19

If X1, X2 and X3 are categorical, what is Y in this case?  The PROC CATMOD approach assumes the cross tabs for the X's defines the number of observations in each cell.  If that is what you are looking for, then the MODEL statement should look like

 

model x1*x2*x3 = _response_;

 

Now if Y is a continuous response, this isn't a good approach.  Instead, try this

 

proc genmod data=yourdata;
class x1 x2 x3;
model y=x1 x2 x3/solution noint cl link=log type3;
run;

This will give the coefficients in the log space, the confidence bounds on the coefficients and the equivalent of an analysis of variance table.  This has an advantage as it is easy to model interactions with fairly simple modifications to the MODEL statement.

 

SteveDenham

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 593 views
  • 0 likes
  • 2 in conversation