Learning SAS? Welcome to the exclusive online community for all SAS learners.

Code behind proc genmod

Reply
Super Contributor
Posts: 259

Code behind proc genmod

Is there a way of seeing the code behind proc genmod

The reason I ask is I'm trying to understand the iterative maximum likelihood algorithm behind this procedure. In the sas documentation, an example of a poisson ditribution is used to generate paramter values for car type and car size.

Basically I want to know the precise steps of how proc genmod takes the raw data to the point where it produces the paramter estimates e.g. how it goes through each iteration etc.

This would be really helpful for my understand.

Many thanks

Message was edited by: Matthew Brophy Here is the link to a very simple example of an application of the proc genmod procedure to claims and exposure data using two factors. http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect0... What I'm looking for is to be able to replicate this outside of sas (iterations and all) in excel so I can derive the paramter estimates of, for example, -1.7643 for a large car, -1.3199 for age 1, and so on..

Trusted Advisor
Posts: 1,932

Re: Code behind proc genmod

I think the likelihood that SAS releases its code for you to examine is zero (or even lower)

You have much more of a chance of figuring out what they did by reading the paper referenced at that link

Aitkin, M., Anderson, D., Francis, B., and Hinde, J. (1989), Statistical Modelling in GLIM, Oxford: Oxford Science Publications.

Valued Guide
Valued Guide
Posts: 684

Re: Code behind proc genmod

You are not ever going to see the code. The algorithm is well known.

By the way, I strongly recommend against using Excel for any data analysis.It is has been documented MANY times that Excel is a terrible program for statistical analysis. (I am sure some will disagree with me).

Super User
Posts: 19,861

Re: Code behind proc genmod

brophymj wrote:

What I'm looking for is to be able to replicate this outside of sas (iterations and all) in excel so I can derive the paramter estimates of, for example, -1.7643 for a large car, -1.3199 for age 1, and so on..

Do you like torturing yourself?

As @lvm has mentioned using Excel for analytics is like digging a tunnel to China with a spoon. 

However, that being said, if you have to do something like this go to a different language. Best case purchase SAS Microsoft Add-In.

Next best, get one of the Python packages that links up to excel and find the appropriate library/package to do the analysis.

Python in Excel - DataNitro

Ask a Question
Discussion stats
  • 3 replies
  • 394 views
  • 3 likes
  • 4 in conversation