turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- How to compute marginal effects in general linear ...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-05-2009 12:48 PM

Hi :

How to get the marginal effects of each independent variable(x1,x2,x3) in general linear model with Y(dependent variable) continuous and link function is log and built-in distribution is gamma.

Thank you!

How to get the marginal effects of each independent variable(x1,x2,x3) in general linear model with Y(dependent variable) continuous and link function is log and built-in distribution is gamma.

Thank you!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to deleted_user

01-06-2009 04:38 PM

I guess the marginal effect of factor x_i is just (*beta_i*yhat*), where *beta_i* is the estimated coefficient for x_i, and *yhat* is the predicted value of y. It seems that the built-in distribution of y doesn't make a difference. Only the link function counts. Maybe it's always the partial derivative of the inverse link function with respect to x_i for all generalized linear models.

I figured this out by playing it in STATA.

For dataset,

/*

x1 x2 y

1 2 33.11

2 1 2.5

3 0 0.4

4 1 0.1

5 2 0.2

*/

Try commands

/*

glm y x1 x2, family(gamma) link(log)

mfx

*/

or

/*

glm y x1 x2, family(poisson) link(log)

mfx

*/

The marginal effects just follow the same rule.

I figured this out by playing it in STATA.

For dataset,

/*

x1 x2 y

1 2 33.11

2 1 2.5

3 0 0.4

4 1 0.1

5 2 0.2

*/

Try commands

/*

glm y x1 x2, family(gamma) link(log)

mfx

*/

or

/*

glm y x1 x2, family(poisson) link(log)

mfx

*/

The marginal effects just follow the same rule.