Help using Base SAS procedures

Conducting Poisson Regression on data set

Reply
Occasional Contributor
Posts: 5

Conducting Poisson Regression on data set

Hello!

I'm new to SAS (it's my first time using it; I'm an R user).

I'm interested in conducting a Poisson regression on the following data:

Game Success Attempts
 
1   4   5
 
2   5   11
 
3   5   14
 
4   5   12
 
5   2   7
 
6   7   10
 
7   6   14
 
8   9   15
 
9   4   12
10   1   4
11   13   27
12   5   17
13   6   12
14   9   9
15   7   12
16   3   10
17   8   12
18   1   6
19   18   39
20   3   13
21   10   17
22   1   6
23   3   12

For each game, Y(i) represents the number of free throws made out of n(i) attempts, which are binomial (n(i), pi(i)).

I want to fit the model pi(i) = alpha.

I was able to do this in R showing the value of alpha equal to .42.

I think I can do this using the Proc genmod on the data, as well as a goodness of fit chi-squared test. Additionally I would like to run the maximum likelihood (ML) and quasi-maximum likelihood method (QML) analysis on the dataset.

SAS Employee
Posts: 232

Re: Conducting Poisson Regression on data set

Hi Andrew, this is logged into the Communities Admin account. I happened to be online and saw your post and that you are a new SAS user. Welcome! It is a bit slower on Sunday here in the community but I'm sure you'll get an answer on Monday if not before. I apologize earlier when your message was caught in our spam filter - that should not happen again.

In the meantime, I did this search in the community - in case there is an answer out there: https://communities.sas.com/search.jspa?view=content&resultTypes=&dateRange=last90days&q=poisson&ran...

You may also want to check out this blog by , a SAS research and statisitician developer.

ttp://blogs.sas.com/content/iml/author/rickwicklin/ . EspeicallRick is frequently online here in the community especially in: and

You may also want to check out SAS Knowledge Base and Reference and Welcome to Statistics and Operations Research

Thanks,

Lainie

Super User
Posts: 9,687

Re: Conducting Poisson Regression on data set

Hi, You should post it at

in: SAS Statistical Procedures

and proc genmod  can do Poisson  Regression .

Check it :http://support.sas.com/kb/24/188.html

data x;

input Game Success Attempts;

cards;

  1   4   5

  2   5   11

  3   5   14

  4   5   12

  5   2   7

  6   7   10

  7   6   14

  8   9   15

  9   4   12

10   1   4

11   13   27

12   5   17

13   6   12

14   9   9

15   7   12

16   3   10

17   8   12

18   1   6

19   18   39

20   3   13

21   10   17

22   1   6

23   3   12

;

run;

proc genmod data=x;

model success=Attempts/dist=p link=log type1 type3;

run;

data y;

  set x;

  ln=log(Attempts);

run;

proc genmod data=y;

model success=/ dist=poisson link=log offset=ln;=ln;

run;

Xia Keshan

Message was edited by: xia keshan

Ask a Question
Discussion stats
  • 2 replies
  • 202 views
  • 2 likes
  • 3 in conversation