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
- /
- General Programming
- /
- How to print probability for proc GENMOD?

Topic Options

- 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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-27-2013 11:52 PM

I would like SAS to print the probability of my binary dependent variable occurring (“Calliphoridae” a particular fly family being present (1) or not (0)), at a specific instance for my continuous independent variable (“degree_index” that was recorded from .055 to 2.89, but can be continuously recorded past 2.89 and always increases as time goes on) using Proc GENMOD. How do I change my code to print the probability, for example, that Calliphoridae is present at degree_index=.1? My example code is:

**proc****genmod** data=thesisdescending ;

class Body_number ;

model Calliphoridae = degree_index / dist=binomial link=logit;

repeatedsubject=Body_number/ type=cs;

estimate'degreeindex=.1' intercept **1 **degree_index **0** /exp;

estimate 'degree_index=.2' intercept **1** degree_index **.1** /exp;run;

I get an output for the contrast estimate results as mean estimate at degree_index=.1 is ..99; degree_index=.2 is .98. THANK YOU!!!

Accepted Solutions

Solution

09-28-2013
03:35 AM

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

Posted in reply to mls002

09-28-2013 03:35 AM

I think that it is correctly modeling the probability...I just didn't include the square of

the degree-day index. If you do, it allows the probability to increase and decrease. I

realized this when I did the probability by hand

(e^-1.1307x+.2119)/(1+e^-1.1307x+.2119) to verify that this really was modeling

probability when y=1 for the mean estimates at specific x values...and then I realized that it is

fitting a regression line and cannot increase and decrease because there is only

one x value.

All Replies

Solution

09-28-2013
03:35 AM

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

Posted in reply to mls002

09-28-2013 03:35 AM

I think that it is correctly modeling the probability...I just didn't include the square of

the degree-day index. If you do, it allows the probability to increase and decrease. I

realized this when I did the probability by hand

(e^-1.1307x+.2119)/(1+e^-1.1307x+.2119) to verify that this really was modeling

probability when y=1 for the mean estimates at specific x values...and then I realized that it is

fitting a regression line and cannot increase and decrease because there is only

one x value.