GLM in excel

Discussion in 'SP8' started by entact, Jul 29, 2014.

  1. entact

    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.
     

    Attached Files:

  2. DevonMatthews

    DevonMatthews Member

    Matrix multiplication is much, much easier to do in R..
     

Share This Page