• We are pleased to announce that the winner of our Feedback Prize Draw for the Winter 2024-25 session and winning £150 of gift vouchers is Zhao Liang Tay. Congratulations to Zhao Liang. If you fancy winning £150 worth of gift vouchers (from a major UK store) for the Summer 2025 exam sitting for just a few minutes of your time throughout the session, please see our website at https://www.acted.co.uk/further-info.html?pat=feedback#feedback-prize for more information on how you can make sure your name is included in the draw at the end of the session.
  • Please be advised that the SP1, SP5 and SP7 X1 deadline is the 14th July and not the 17th June as first stated. Please accept out apologies for any confusion caused.

GLM in excel

E

entact

Member
I have attached a really simplified example of applying the formula

(X^T. X)^(-1).X^T.Y = B

using matrix multiplication but I think the answer I'm getting is wrong. X is a 28*16 matrix (28 risks, 16 parameters) and Y is claim sizes for each risk. To keep this simple I have assumed all have equal weight and not used gamma distribution.

When I implement the formula above, i get very strange paramter values which I might have expected but when I generate the Y's using these paramter values the average of the Y's is very different to the average of the average of the actual claims values.

The columns are linearly independent so I'm not sure why this is happening.
 

Attachments

  • GLM example.xlsx
    41.6 KB · Views: 149
Matrix multiplication is much, much easier to do in R..
 
Back
Top