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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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