BookmarkSubscribeRSS Feed
Andrew1
Calcite | Level 5

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.

2 REPLIES 2
Community_Help
SAS Employee

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

Ksharp
Super User

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 692 views
  • 2 likes
  • 3 in conversation