BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
NinaWestern
Obsidian | Level 7

I am using proc genmod with tweedie distribution and log link to analyze positively skewed outcome.

Trying to figure out the actual regression equation to include it in the paper.

I am struggling with how to reflect the link function in the equation.

 

Here is the SAS syntax: 

proc genmod data=sasuser...;
class sex CAS;
model int= sex age_cent age_sq sex*age_cent CAS rstr_cent rstr_sq sex*rstr_cent/dist=tweedie link=log;
run;

 

Here sex is coded 0 and 1, CAS has 4 categories (1,2,3,4), and the last category is used as a reference.

The model includes the quadratic effects of age and Rstr.

Wondering if the following equation is correct:

 

NinaWestern_1-1601915351337.png

 

 

Or should it be without Ln's in the formula? 

NinaWestern_2-1601916140543.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

This may not answer you question specifically but lets you check your answer.

 

You can use a CODE statement in PROC GENMOD, in many cases, and it will generate the code to score new data. Looking at that code can help you check if the formula is correct when typing it out. 

 

https://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html

 


@NinaWestern wrote:

I am using proc genmod with tweedie distribution and log link to analyze positively skewed outcome.

Trying to figure out the actual regression equation to include it in the paper.

I am struggling with how to reflect the link function in the equation.

 

Here is the SAS syntax: 

proc genmod data=sasuser...;
class sex CAS;
model int= sex age_cent age_sq sex*age_cent CAS rstr_cent rstr_sq sex*rstr_cent/dist=tweedie link=log;
run;

 

Here sex is coded 0 and 1, CAS has 4 categories (1,2,3,4), and the last category is used as a reference.

The model includes the quadratic effects of age and Rstr.

Wondering if the following equation is correct:

 

NinaWestern_1-1601915351337.png

 

 

Or should it be without Ln's in the formula? 

NinaWestern_2-1601916140543.png

 

 

 


 

View solution in original post

1 REPLY 1
Reeza
Super User

This may not answer you question specifically but lets you check your answer.

 

You can use a CODE statement in PROC GENMOD, in many cases, and it will generate the code to score new data. Looking at that code can help you check if the formula is correct when typing it out. 

 

https://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html

 


@NinaWestern wrote:

I am using proc genmod with tweedie distribution and log link to analyze positively skewed outcome.

Trying to figure out the actual regression equation to include it in the paper.

I am struggling with how to reflect the link function in the equation.

 

Here is the SAS syntax: 

proc genmod data=sasuser...;
class sex CAS;
model int= sex age_cent age_sq sex*age_cent CAS rstr_cent rstr_sq sex*rstr_cent/dist=tweedie link=log;
run;

 

Here sex is coded 0 and 1, CAS has 4 categories (1,2,3,4), and the last category is used as a reference.

The model includes the quadratic effects of age and Rstr.

Wondering if the following equation is correct:

 

NinaWestern_1-1601915351337.png

 

 

Or should it be without Ln's in the formula? 

NinaWestern_2-1601916140543.png

 

 

 


 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 406 views
  • 1 like
  • 2 in conversation