Mathematcal Statstcs Stockholm Unversty Estmaton of Dsperson Parameters n GLMs wth and wthout Random Effects Meng Ruoyan Examensarbete 2004:5
Postal address: Mathematcal Statstcs Dept. of Mathematcs Stockholm Unversty SE-106 91 Stockholm Sweden Internet: http://www.matematk.su.se/matstat
Mathematcal Statstcs Stockholm Unversty Examensarbete 2004:5, http://www.matematk.su.se/matstat Estmaton of Dsperson Parameters n GLMs wth and wthout Random Effects Meng Ruoyan January 2004 Abstract In ths paper, we study estmaton of dsperson parameters n GLMs wth and wthout random effects wth focus on ts applcaton n nonlfe nsurance. Three dfferent methods of estmatng φ, the dsperson parameter n the GLMs, have been presented, namely maxmum lkelhood, Pearson and Devance methods. We extended the GLMs by ntroducng a random effect representng so-called mult-level factor. Ths ntroduces an addtonal dsperson parameter α. We nvestgate two methods that have been suggested for estmatng α: the maxmum lkelhood method and an alternatve method proposed by Ohlsson and Johansson(2003b). We study and compared all the estmaton methods partly by emprcal studes wth data from the non-lfe nsurance and partly by smulatons. Keywords: Generalzed lnear models, dsperson parameters, multlevel factors, Tweede models. E-mal: mengruoyan@malcty.com Supervsors: Esbjörn Ohlsson and Björn Johansson.
Contents 1 Non-lfe Insurance and Generalzed Lnear Models 3 1.1 Mathematcal Modellng for Non-lfe Insurance......... 3 1.2 Introducton to Generalzed Lnear Models........... 5 1.3 GLMs for the Average Clam Amount.............. 6 2 Estmaton of the Dsperson Parameter φ 7 2.1 Three Estmaton Methods of φ................. 8 2.1.1 Devance and Pearson Estmaton of φ......... 9 2.1.2 Maxmum Lkelhood Estmaton of φ.......... 10 2.1.3 Comparson of the three Methods............ 11 2.2 Numercal Examples from Car Insurance............ 12 2.2.1 Analyss of car nsurance data.............. 12 2.2.2 Analyss of Estmators.................. 13 2.2.3 Senstvty of estmates to extreme values........ 16 2.3 Smulaton............................. 18 2.3.1 Smulatons wth Gamma Dstrbuted Clams..... 18 2.3.2 Smulatons wth Pareto Dstrbuted Clams...... 19 3 Estmaton of Dsperson parameters n GLMs wth Random Effect 21 3.1 Introducton to GLMs wth Random Effect........... 21 3.1.1 Jewell s Theorem..................... 22 3.1.2 Tweede Models and Random Effects n GLMs..... 23 3.2 Estmaton of the α........................ 24 3.2.1 ML Estmaton of α................... 24 3.2.2 An Alternatve Estmaton Method........... 25 3.2.3 Estmaton Algorthm.................. 26 3.3 Applcaton to Car Insurance.................. 26 3.3.1 Emprcal Study...................... 26 3.3.2 Smulaton Study..................... 29 4 Concluson 32 5 Reference 34 6 Appendx A 35 7 Acknowledgement 39 2
1 Non-lfe Insurance and Generalzed Lnear Models The am of ths paper s to study estmaton methods for dsperson parameters n Generalzed Lnear Models (GLMs) n the context of non-lfe nsurance. Before we go nto detals, we need to gve a bref pcture of what GLMs are and how they are used n non-lfe nsurance. In the frst part of ths secton, we are gong to ntroduce some mportant defntons concernng non-lfe nsurance. In the second part an outlne of the theory of GLMs wll be presented. Fnally, we present more detals on how GLMs are appled n modellng the average clams n non-lfe nsurance. 1.1 Mathematcal Modellng for Non-lfe Insurance Non-lfe nsurance protects the nsured aganst certan rsks, such as fnancal loss or property damage lablty. The nsured s oblged to pay a premum to the nsurer who undertakes to ndemnfy for the losses. The premum s the prce to nsure a specfed rsk for a specfed perod of tme. An mportant task for actuares s to model the premum so that t reflects dfferences between groups of customers. The most mportant part of the premum s the rsk premum, whch s defned as the average clam cost per nsured. It can be expressed n terms of two other quanttes, average clam amount and clam frequency: Rsk premum = clam frequency average clam amount where average clam amount equals the total clams cost dvded by the number of clams and clam frequency s the average number of clams per year. In ths paper we shall only consder the problem of modellng the average clam amount. 3
We seek a model that descrbes the dfferences n average clam amount among varous groups of customers. For nstance, n the case of car nsurance, large cars may have hgher average clams than small ones. To deal wth the problem, nsurance companes often defne several varables, whch are related to propertes of the customers or the nsured objects. Such varables are called ratng factors. In car nsurance, ages of cars and ages of drvers are two commonly used ratng factors. Ratng factors are often dscretzed by formng group of adjacent values. For nstance, car age can be dscretzed by lettng cars aged 0-2 years form one group, 3-5 years another and so on. Customers belongng to the same group wth respect to all the ratng factors are sad to belong to the same tarff cell. In the model, customers n the same tarff cell are consdered to have the same average clam amount. In a statstcal model, we consder ratng factors as regressors for the response varable, the average clam amount. In ths crcumstance, the classcal regresson models are no longer applcable for the followng reasons: 1. Classcal lnear models are addtve whlst we prefer a multplcatve model, because n the context of average clam amount we are more nterested n the relatve change aganst a standard level rather than the change n absolute values. 2. In the classcal lnear models, t s assumed that the response varable has a Gaussan dstrbuton. Ths s obvously unreasonable for average clam amount, whch only takes non-negatve values and s skewed to the rght. Hence classcal lnear models are not the most sutable n ths context. We need to fnd other models whch can solve these problems. 4
1.2 Introducton to Generalzed Lnear Models Generalzed lnear models (GLMs) are an extenson of classcal lnear models. Frstly, GLMs allow a more extensve dstrbuton famly for the response varable than just the Gaussan dstrbuton. The probablty densty for the response varable can be expressed as: { } yθ b(θ) f(y) = exp + c(y, φ) φ/w where w denotes the weght of the response varable. Ths dstrbuton famly s known as Exponental Dsperson Models (EDM). Apart from the Gaussan dstrbuton, there are many other dstrbutons belongng to ths famly, such as the bnomal, Posson and gamma dstrbutons. GLMs are parameterzed n terms of the parameters θ and φ. The latter s called the dsperson parameter. We are gong to focus on estmaton methods for ths parameter n the next secton. The mean and varance of Y can be wrtten as follows: µ = E(Y) = b (θ) Var(Y) = b (θ)φ w = V (µ)φ (2) w where V (µ) s called the varance functon. The varance functon s of much mportance because t has one-to-one relatonshp to the dstrbuton wthn EDM. In another words, the varance functon determnes exclusvely the specfc dstrbuton wthn the EDM famly (Jögensen, 1987). Table 1 summarzes some varance functons for dfferent dstrbutons n EDM: Dstrbuton Normal Posson Gamma Bnomal V (µ) 1 µ µ 2 µ(1 µ) Table 1: Examples of the varance functons for the dstrbutons n EDM. (1) The other extenson n GLM s that the relaton between the mean and the regressors does not have to be lnear. The so-called lnk functon relates a 5
lnear predctor η to the expected value µ of response varable Y where η s defned by J η = β j x j (3) j=0 where x j are ndcator varables determnng whether to nclude a β j or not. In classcal lnear models we defne that η = µ whereas n the case of GLMs η and µ are related to each other through a monotonc dfferentable lnk functon η = g(µ). For nstance η = log(µ) and η = log( µ ) are two of the 1 µ most common lnk functons. 1.3 GLMs for the Average Clam Amount As has been dscussed n the prevous secton, GLMs have some advantages over classcal lnear models for modellng average clam amount. Before we apply GLMs to average clam amount, we frst need to make some assumptons: Assumpton 1.1 a. The amount of dfferent clams are ndependent of each other. b. Wthn a tarff cell, all clams amounts have the same dstrbuton. There are manly two ways to ft GLMs to data. One s to aggregate data n terms of the total cost of clams and total number of damages wthn every sngle tarff cell before fttng the GLM. The other way s to ft GLM drectly to all the ndvdual observatons wthout aggregaton. The results should be the same as concerns the regresson parameters β j, but we choose the latter one for the reason that non-aggregated data contans more nformaton on the varance than the aggregated data does and thus should gve a more precse estmate of φ. 6
We now defne X as the :th clam amount where = 1, 2, 3...M and M s the total number of clams. Accordng to the defnton, the response varable, average clam amount Y = X /w has w equal to 1 n the non-aggregated data. The model for E(Y ) can be descrbed as by equaton 3, where β j n ths case denotes the j:th ratng factor. We use a log-lnk, η = log(µ ) to buld up a multplcatve model for E(Y ), whch can be rewrtten as follows: J E(Y ) = µ = exp (η ) = exp ( β j() x j() ) = γ 0 γ 1() γ 2()... γ j() (4) j=0 where γ j() s the relatvty of ratng factor j for clam number. It s customary to choose as reference cell the tarff cell wth the largest number of clams. γ 0 denotes the parameter for the reference cell. If clam belongs to the reference cell, γ j() = 1 for all the j and γ 0 s the expectaton of clam. As for the dstrbuton of Y, there s no canoncal choce. However n practce, t s often reasonable to assume that the standard devaton s approxmately proportonal to ts mean value. Based on ths fact, a often used assumpton when usng GLMs to model average clam amounts s that V (µ ) = µ 2. From Table 1, we see that the correspondng dstrbuton n EDM s the gamma dstrbuton. 2 Estmaton of the Dsperson Parameter φ In ths secton we consder estmaton of the dsperson parameter φ n GLMs n the context of non-lfe nsurance. The parameter φ affects GLMs n the followng aspects: Frstly, for EDM, the varance of the response varable Y has the form: V ar(y ) = V (µ)φ/w. Ths shows that the varance of Y s proportonal to the value of φ, whch mples that a good estmator of φ gves a good reflecton of the varance of Y. Secondly, for GLM we estmate the parameters β by maxmzng the log- 7
lkelhood functon, l for Y,.e by settng l/ β = 0. Accordng to asymptotc theory the estmates of β follows approxmatvely a normal dstrbuton: ˆβ N(β; I 1 ) where I s Fsher s nformaton matrx, the negatve expected value of H, the matrx of the second order dervatves of the log-lkelhood functon l wth respect to β: ( 2 ) l I = E = β j β k x j w φv(µ )g (µ ) 2 x k Ths expresson tells us that although the value of ˆβ does not depend on φ, φ does affect the precson of β and a precse estmate ˆφ s mportant to get a good confdence nterval for β. In secton 2.1, we ntroduce three dfferent estmaton methods for φ, and n secton 2.2, we apply the methods to car nsurance. 2.1 Three Estmaton Methods of φ We wll assume that V (µ ) = µ 2, correspondng to a gamma dstrbuton. The densty functon can be expressed n the parameters µ and φ as (Ohlsson & Johansson, 2003): f Y (y ) = exp ( ) y /µ log(µ ) + c(y, φ, w ) φ/w (5) where c(y, φ, w ) = log(w y /φ)w /φ log(y ) log Γ(w /φ) The expresson above s a straght forward re-parametrzaton of the densty functon of gamma dstrbuton n terms of α and β (See Appendx A1): f(y) = βα Γ(α) yα 1 e βy We are gong to present three methods to estmate the parameter φ: Devance method 8
Pearson method Maxmum Lkelhood method 2.1.1 Devance and Pearson Estmaton of φ We start wth Devance estmaton of φ. Devance, as a measure of goodness of ft, s defned as followng: D(y, ˆµ) = φ D (y, ˆµ) = 2 φ[l(y, φ) l(ˆµ, φ)] Where l( ) s log-lkelhood functon. D and D are called scaled and nonscaled Devance respectvely. We can estmate φ by the mean scaled Devance, expressed n equaton 6 (Ohlsson and Johansson, 2003a): D(y, ˆµ, φ) [l(y, φ) l(ˆµ, φ)] ˆφ d = = 2 φ (6) n r n r where r s the total number of unknown parameters. D = D/φ s approxmately χ 2 (n r) dstrbuted wth expectaton (n r). Thus ˆφ d s approxmately unbased. Now we assume that the response varable Y follows a gamma dstrbuton, by whch we can obtan the explct expressons for ˆφ d : ˆφ d = 2 n r ( ( ) ˆµ w log y + y ) ˆµ = 2 ˆµ n r ( ) ˆµ w log y (7) where we use the fact that w (y ˆµ)/ˆµ = 0, whch can be derved from the ML equaton for ˆβ n the case of gamma dstrbuton (Ohlsson & Johansson, 2003). Apart from the Devance estmator of φ, we can also use the Pearson method to estmate φ, where the ˆφ p can be expressed as: ˆφ p = φ X2 n r (8) 9
where X 2 s the Pearson X 2 statstc wth the form: X 2 = 1 ( (y ˆµ ) 2 ) w φ v( ˆµ ). ˆφ p s approxmately unbased because Pearson s X 2 follows approxmately χ 2 (n r) dstrbuton wth expectaton (n r). Under the assumpton that Y s gamma dstrbuted, we can derve the explct expresson of ˆφ p : ˆφ p = 1 n r w (y ˆµ ) 2 υ(ˆµ ) = 1 n r w (y ˆµ ) 2 ˆµ 2 (9) 2.1.2 Maxmum Lkelhood Estmaton of φ The maxmum lkelhood method (ML) estmate s the value that maxmzes the lkelhood or log-lkelhood functon. Wth the assumpton that V (µ ) = µ 2, Y follows a gamma dstrbuton wthn EDM and ts loglkelhood functon can be expressed as: l(µ ; φ) = n ( ( ) ( ) w φ log w w + φµ φ 1 log(y) w ( y log Γ( w )) φµ φ ) where n s the total number of observatons. To obtan the ML estmator of φ we frst obtan the ML estmate of µ, whch s ndependent of φ. Then the ML equaton s obtaned by settng the dervatve of the log-lkelhood functon wth respect to φ equal to zero. The ML estmate of φ s the soluton of the ML equaton. The ML equaton expressed n terms of the parameters µ and φ for the gamma dstrbuton has the form (for the proof see Appendx A2): ( ) ( )) n D w w = 2 w (log Ψ =1 ˆφ ˆφ 10
where D as defned before, the devance for the gamma dstrbuton and Ψ( ) s known as the dgamma functon: D = 2 ( ) n ˆµ w log ; Ψ (x) = Γ (x) y Γ (x) Snce Y here represents the :th observaton of loss, w = 1 for all the. The equaton above can be reduced to log(1/ ˆφ) Ψ(1/ ˆφ) = D/2n and then an approxmate soluton for ˆφ s [Cordero and McCullagh 1991]: ˆφ m 2D n(1 + (1 + 2D /3n) 1/2 ) (10) 2.1.3 Comparson of the three Methods Ths secton apples only when the response varable Y s gamma dstrbuted. An nterestng statement made by Cordero and McCullagh (1991) s that from the nequalty 1/2x < log(x) Ψ(x) < 1/x, we can nduce a relaton between φ d and φ m : D /2n < ˆφ m < D /n ˆφ d (n r) 2n < ˆφ m < ˆφ d (n r) n Ths mples that when the total number of observatons s large, ˆφ d should always be larger than the ˆφ m and the values of ˆφ m s n between ˆφ d /2 and ˆφ d. We can also compare the Pearson estmator wth the devance estmator by takng advantage of Taylor expanson: f(a) = f(a) + f (a)(x a) + f (a) 2! (x a) 2... f (n) (a) (x a) n... n! We apply the above to the expresson of ˆφd Appendx A3): and obtan (for a proof see ˆφ d 1 n r ( ) 2 y ˆµ w 1 ˆµ n r ( 2w y ˆµ 3 ˆµ 11 ) 3
We see that ˆφ p s the frst term of the expresson above. The last term, whch can take both postve and negatve values can be consdered as a measure of the dfference between these two estmators. Thus the ˆφ p can be ether larger or smaller than the ˆφ d. These two estmators are approxmately the same only when the values of y are close to the predcted values,.e. the GLM has a good ft to the data. What deserves notce here s that even though the Pearson and Devance estmators can be consdered as measures of devatons of Y from ˆµ, they can come to qute dfferent results. The Pearson estmator to some extent mght exaggerate the devatons by takng the square of the dfference between y and ˆµ whle the Devance estmator on the opposte mght under-estmates the devatons because t dmnshes wth the logarthm of the rato of ˆµ and y. 2.2 Numercal Examples from Car Insurance In ths secton we study the φ estmators for the data from car nsurance. In order to gan more nsghts nto the propertes of the φ estmators, n the next secton we study the emprcal dstrbutons of the φ estmators obtaned by smulaton. Fnally our emprcal outcomes wll be compared wth the theoretcal dscusson n the prevous secton. 2.2.1 Analyss of car nsurance data The data that we use conssts of totally 896,321 car nsurances clams from year 1995 to 2000. We dvde all the clams nto 4 groups correspondng to the nsurance covers, namely Thrd part lablty (TPL), Hull, Partal kasko and Mer. The cover TPL protects the nsured aganst fnancal loss arsng out of legal lablty mposed upon hm/her n connecton wth bodly njury, property damage, medcal payments etc. Hull covers damage made to the nsured s vehcle that results from a collson wth another vehcle or 12
object or damage ncurred when vehcle s transported by boat or tran etc. Partal kasko s a comprehensve cover that protects aganst losses resultng from glass damage (Gls), theft (Sto), fre (Bra), salvage (Rad) and machne (Mas). Mer covers some rsks that are not defned n the other rsk covers, e.g. ntentonal damage. We are gong to ft a GLM to the emprcal data for each cover and each subcover of Partal kasko and thereby obtan the correspondng φ estmates. Each observaton corresponds to a specfc clam dentfed by an exclusve clam number. The data set ncludes only clams wth postve amount,.e. we exclude zero clams. The followng table lsts the number of observatons and the clam years for each cover/subcover: Rsk cover Nmb of obs Duraton TPL 51,880 1995-1998 P.kasko 342,105 1995-2000 Mer 51,013 1995-2000 Hull 109,797 1995-2000 Gls 198,817 1995-2000 Sto 97,005 1995-2000 Bra 6,257 1996-2000 Rad 32,045 1995-2000 Map 7,402 1996-2000 Table 2: Car nsurance: Number of observatons of average clam amounts from 1995 to 2000 n terms of dfferent covers. Usng the SAS procedure Proc Genmod, we estmate φ by the three dfferent methods for the dfferent covers. The estmaton results are summarzed n table 3: 2.2.2 Analyss of Estmators In ths secton, we are gong to dscuss the estmaton results n two dfferent ways. The frst way s to compare the estmates for dfferent covers. Secondly 13
Average clam Cover Pearson Devance ML TPL 34,054 2,623 2,054 P.kasko 6,477 1,317 1,124 Mer 1,957 1,202 1,035 Hull 1,285 1,023 0.897 Gls 8,143 0,384 0,362 Sto 2,363 1,146 0,993 Bra 1,764 1,330 1,125 Rad 3,723 1,257 1,077 Mas 1,150 1,026 0,893 Table 3: Estmaton results of parameter φ n the GLM for average clams n car nsurance wth three dfferent methods: Pearson, Devance and ML. we are gong to make a comparson of estmaton results among the three methods. Frst of all, comparng the φ estmates for the dfferent covers we see that the φ estmates for TPL are much larger than the other three rsk covers, no matter whch estmaton method s used. The reason s that large clams are far more domnatng n TPL than the other covers. Clams above 1 mllon SEK are qute common for TPL whle they seldom occur for the other covers. Hence t s reasonable to expect that values of φ are larger n ths case. Partal kasko s also worth notcng because although the φ estmates wth ML and Devance methods are close to those of Mer and Hull, t has an usually large estmate wth the Pearson method. If we study furthermore the φ estmates for the subcover of Partal kasko we fnd that Gls s the man cause to the large value of the φ estmate n the whole group. Gls protects aganst the rsk of damages to car wndows and the value of car wndows are not expected to vary sgnfcantly. Thus we suspect that there mght exst abnormal observatons or errors n the data. The exstence of outlers n the data can be examned by plottng resduals. There are several ways to defne resduals but we choose the Anscombe resdual (P.McCullagh and J.A.Nelder, 1997). An advantage of usng anscombe 14
resduals s that wth some mathematcal manpulatons we can obtan the adjusted resdual, whch s normal-lke dstrbuted. The anscombe resdual s gven by the followng expresson for gamma dstrbuted Y : r = 3(y1/3 µ 1/3 ) µ 1/3 where r are dentcally dstrbuted wth mean zero f the assumpton that Y s gamma dstrbuted holds. Means as well as varances of r for the four covers are showed n the followng table: Rsk cover Mean Std.Dev of resdual Skewness TPL -0,843 1,224 3,977 P.kasko -0,423 1,008 1,996 Mer -0,361 0,993 0,816 Hull -0,305 0,927 0,602 Table 4: Means, standard devatons and skewness of the anscombe resduals of the GLM for the average clams n terms of dfferent covers. For TPL, the varance, as expected s larger than the other three covers. The resduals of Partal kasko although wth a smaller varance than n the TPL, are qute skewly dstrbuted. The skewness of the resduals ndcates the exstence of extreme values n both TPL and Partal kasko. We have also checked the dstrbutons of resduals for all the covers and fnd that all of the dstrbutons are a lttle skewed to the rght, whch mples that the GLM wth gamma dstrbuton does not ft perfectly to our data. However we stll regard them as acceptable and leave the problem to the later sectons, where we are gong to study what happens to the estmators of φ when the dstrbuton assumpton s questonable. We next compare the estmaton results obtaned wth dfferent methods wthn the dfferent covers. It s shown clearly that the values of ˆφ are rather close for ML and Devance. The Devance estmates are a lttle bt larger than ML for all the covers. Ths results s n accordance wth our theoretcal analyss n secton 2.1.3. However, the Pearson estmates take the largest 15
value compared wth the other two, probably due to the exstence of extreme values. The Pearson estmate for TLP deserves extra attenton snce t s abnormally larger than the devance and the ML estmates. It possbly ndcates the senstvty of the Pearson estmator to large amounts. For the cover Mer however, all these three estmates are farly close to each other. We may summarze the results as follows: 1. The covers TLP and Partal kasko represent two dfferent phenomena. TLP has both large varance and skewness n the resduals. In practce the dstrbuton of TLP clams has fat tals due to the large amounts n some clams. In ths crcumstance, the assumpton of a gamma dstrbuton makes less sense than for the other covers. For Partal kasko varance of the resduals s not very large but the skewness, caused by outlers, s large. To deal wth ths knd of data, t s mportant to fnd out the causes for the outlers. It turned out that n ths case, the outlers were caused by defectve recordng procedures. 2. The Pearson estmates dffer greatly from the estmates wth the other two methods especally for the TPL and Partal kasko. It mples that the Pearson estmator of φ s senstve to the varance of data and extreme values, whle such values do not have much effect on ML and devance estmators. 2.2.3 Senstvty of estmates to extreme values In the prevous secton, we found that estmaton results of φ were qute dependent on whch estmaton method we employed, partcularly for the covers where extremely large losses occur. Ths observaton motvates us to study more closely how the φ estmates react to extreme values. In order to reduce the load of work, we choose the covers TLP as well as Gls as our study objects, where Gls s one of the subgroups of Partal Kasko and contrbutes 16
most to the varaton n the group. There are manly two alternatves when dealng wth extreme values. One s truncaton where the clam cost above a certan level s cut away. Truncaton s often used to deal wth the problem of large clams n non-lfe nsurance. The other alternatve s to delete all observatons defned as extreme. When the outlers are assumed to be caused by errors, t s natural to use the second method. After truncaton or deleton we obtan a modfed data set whch wll be used to ft GLMs and estmate the parameter φ. In order to study the senstvty of ˆφ to the extreme values we are gong to set several levels at whch the data wll be truncated or deleted so that we can observe how φ estmates change wth dfferent levels. We use truncaton for rsk cover TLP and deleton for Gls. The results are showed n table 5 and table 6 respectvely: Method Orgnal estmate level1 level2 level3 level4 Pearson 34,054 10,194 2,953 1,782 0,640 Devance 2,623 2,124 1,588 1,333 0,801 ML 2,054 1,711 1,326 1,136 0,718 Table 5: Estmatons of the parameter φ n the GLM for the cover TLP wth truncatons on four dfferent levels (Unt: SEK): level 1 = 1 000 000; level 2 = 200 000; level 3 = 100 000; level 4 = 30 000. Method Orgnal estmate level1 level2 level3 level4 Pearson 8.143 1,444 0,286 0,235 0,261 Devance 0.384 0,352 0,335 0,322 0,309 ML 0.362 0,333 0,318 0,306 0,295 Table 6: Estmatons of the parameter φ n the GLM for the cover Gls wth truncatons on four dfferent levels (Unt: SEK): level 1 = 500 000; level 2 = 50 000; level 3 = 4 686 (correspondng to 99% quantle) level 4 = 3 415 (correspondng to 95% quantle). From the table 5 and 6, we fnd that the Pearson estmates are qute senstve to large values whle the Devance and ML estmates are much less affected by truncaton or deleton. Besdes, we also notce that after truncaton or dele- 17
ton of the extreme values on certan levels, the Pearson estmates decrease dramatcally and become less than the values of the devance estmate. 2.3 Smulaton From the prevous secton, we found that n practce, there can be large dfferences between the φ estmates. In ths secton, we are gong to study the propertes of the φ estmators when the underlyng dstrbuton s known and try to fnd out whch estmator s the most relable by a smulaton study. The estmators wll be compared n terms of unbasedness and effcency. In order to lmt the study, we wll only choose two rsk covers: TPL and Hull. Two problems wll be of nterest n ths secton. Frst we are gong to study how the φ estmates behave when the assumpton of a gamma dstrbuton s true. The other nterestng problem s what the emprcal dstrbutons of ˆφ look lke when the response varable s no longer gamma dstrbuted but the relatonshp V (µ ) = µ 2 stll holds. There are many non-edm dstrbutons whch satsfy the condton above, we choose the Generalzed Pareto dstrbuton whch has a fat tal. We smulate data out of ths dstrbuton and ft GLMs to t under the false assumpton that Y s gamma dstrbuted. We are nterested n studyng whether estmators are robust to varaton of the Y dstrbuton. 2.3.1 Smulatons wth Gamma Dstrbuted Clams We assume that the clams Y follow the Gamma dstrbuton where E(Y ) = µ and V ar(y ) = φ µ 2. For the parameter µ, we use the estmated values for TPL and Hull from the prevous sectons. We choose the true value of φ also based on the earler estmatng results so as to make the smulated data as realstc as possble. Besdes, the number of clams per tarff cell s chosen n accordance wth the emprcal data. We ftted GLMs to the smulated data wth 10 000 repettons, each of whch contaned the same 18
number of observatons as n the real data. We obtan the correspondng 10 000 φ estmates and so ther emprcal dstrbuton. The mean of the emprcal dstrbuton wll be compared to the true value of φ. Results of the smulatons wth the dfferent estmaton methods are presented n table 7 and 8: Estmaton method Mean of ˆφ Std.Dev of ˆφ ML 1,9999 0,010 devance 2,5426 0,014 Pearson 2,0015 0,020 Table 7: Means and standard devatons of the three estmators of φ for TPL wth gamma dstrbuted average clams. The results are obtaned by 10 000 smulatons and the true value of φ s 2. Estmaton method Mean of ˆφ Std.Dev of ˆφ ML 1,0497 0,005 devance 1,2194 0,006 Pearson 1,0496 0,006 Table 8: Means and standard devatons of the three estmators of φ for Hull wth gamma dstrbuted average clams. The results are obtaned by 10 000 smulatons and the true value of φ s 1.05. For the Pearson and ML estmates, the means of the estmates are very close to the true value whlst the means of the devance estmates devates qute much from the true value for both covers. It s also shown that the standard devatons of all the estmates are qute small, ndcatng good effcency of the estmators. 2.3.2 Smulatons wth Pareto Dstrbuted Clams In ths secton we are tryng to answer at least partly the queston of how the dstrbutonal assumpton affects the estmaton of φ wth the three methods. In practce, one often uses a quadratc varance functon, correspondng to a gamma dstrbuton. However, even f a quadratc varance functon may be realstc, the gamma assumpton may not always be sutable, especally n 19
the presence of extreme values. In many cases, dstrbutons wth fatter tals ft better the emprcal data, e.g. the log-normal dstrbuton or the generalzed Pareto dstrbuton etc. Nether of them belongs to the EDM famly. Therefore we cannot apply these dstrbutons drectly n the frame of GLM. We have studed what happens to the φ estmates f we stll assume gamma dstrbuton though the real data follows a generalzed Pareto dstrbuton. It may be noted that McCullagh and Nelder (1997) recommends usng the Pearson estmator n stuatons where the gamma assumpton s n doubt. We smulated data from a generalzed Pareto dstrbuton wth the same true value of φ as before. Fttng GLMs to the data wth the assumpton of a gamma dstrbuton, after 10 000 repettons, we obtaned the emprcal dstrbuton of the φ estmator. Table 9 and 10 show the means and varances of ˆφ: Estmaton method Mean of ˆφ Std.Dev of ˆφ ML 0,807 0,003 devance 1,469 0,006 Pearson 1,989 0,069 Table 9: Means and standard devatons of the three estmators of φ for TPL wth generalzed pareto dstrbuted average clams. The results are obtaned by 10 000 smulatons and the true value of φ s 2. We see that only the means of the Pearson estmates are close to the true value. Both the ML and devance estmators are based. Another pont worth notcng s that the varance of the Pearson estmator s much greater than the correspondng value when the response varable s gamma dstrbuted. Estmaton method Mean of ˆφ Std.Dev of ˆφ ML 0,982 0,005 devance 1,179 0,007 Pearson 1,049 0,010 Table 10: Means and standard devatons of the three estmators of φ for Hull wth generalzed pareto dstrbuted average clams. The results are obtaned by 10 000 smulatons and the true value of φ s 1.05. 20
3 Estmaton of Dsperson parameters n GLMs wth Random Effect In practce, one s often encountered wth the problem of mult-level factors. A mult-level factor has a large number of classes, many of whch wth nsuffcent data for relable estmates. Car model s a typcal example of a mult-level factor. Nelder & Verral (1997) and Ohlsson & Johansson (2003b) suggested that mult-level factors can be modelled as random effects n GLMs. These models nclude an addtonal dsperson parameter α and two dfferent methods of estmatng α wll be ntroduced. An emprcal study of the three methods s presented wth the same data as we used n the prevous secton. The secton s ended wth a smulaton study. 3.1 Introducton to GLMs wth Random Effect Accordng to Ohlsson and Johansson (2003b), GLMs can be extended by ntroducng a random effect U n the way that µ (u k ) = E(Y U k = u k ) = µ u k for each level k of the random effect and µ = γ 0 γ 1() γ 2()...γ j(), the product of all the relatvtes. It s natural to assume that E(U k ) = 1 snce U k can be nterpreted as a random devaton from the mean value gven by other ratng factors. Ths corresponds to assumng mean zero for the random effects n addtve models. The man problem s how we fnd a sutable predctor for U k. Accordng to Ohlsson and Johansson (2003b), the optmal lnear predctor can be expressed as g(y ) = E(U k Y ), whch mnmzes the mean square error. In the frst part of ths secton, we are gong to gve a bref ntroducton to Jewell s Theorem, provdng an dea of how to obtan g(y ) = E(U k Y ) when Y s an EDM and µ depends on a random effect. Then we wll dscuss so-called Tweede models, where we can obtan an explct expresson for E(U k Y ). 21
3.1.1 Jewell s Theorem We assume that condtonng on parameter Θ, the dstrbuton of the response varable Y s an EDM wth densty: f Y Θ(y θ) = exp ( ) y θ b(θ) + c(y, φ, w ) φ/w (11) where we have suppressed the ndex k and defned µ(θ) = E(Y Θ). assume also that: We Assumpton [2] Θ k are ndependent and dentcally dstrbuted random varables for k = 1, 2...K. For k = 1, 2...K, the pars (Y k, Θ k ) are ndependent. Condtonal on Θ k the random varables Y 1k,Y 2k,...,Y Ik,k are ndependent. Gven the dstrbuton of the parameter Θ, whch functons as pror dstrbuton, we can get the posteror dstrbuton F Θ Y (θ y) wth the help of Bayes theorem. In Jewell s theorem, t s assumed that dstrbuton of Θ s of the form: where: and ( ) θδ b(θ) f Θ (θ) = exp + d(δ, α) 1/α α = (12) δ = E(b (Θ)) = E(µ(Θ)) (13) E(b (Θ)) V ar(b (Θ)) = E(V (µ(θ))) V ar(µ(θ)) (14) α s the addtonal dsperson parameter n the GLMs wth random effect. Equaton 14 shows how the dsperson parameter α s related to the varance 22
of µ(θ). It follows from Bayes s theorem that: f Θ Y (θ y) exp ( ) θ δ b(θ) 1/ α (15) where α = α + (w./φ) and δ = E(µ(Θ) Y ) = (αδ + (w./φ)ȳ)/ α. We see from the above that the posteror dstrbuton belongs to the same famly as the pror dstrbuton of Θ. In such a case, we call the dstrbuton a natural conjugate dstrbuton of Y Θ. 3.1.2 Tweede Models and Random Effects n GLMs In Jewell s theorem, only the random effect s consdered. In ths secton we are gong to ntroduce a sub-famly of EDM, for whch t s possble to extend Jewell s theorem to the stuaton wth fxed effects apart from the random effect. An EDM s called a Tweede model f the varance functon can be wrtten as: where p s a postve nteger. V (µ) = µ p (16) For the Tweede models, under certan condtons (Ohlsson and Johansson, 2003b): α = E(µ(Θ k) p ) V ar(µ(θ k ) where n the case of p = 2, α can expressed as: α = 1 + 1 V ar(µ(θ k )) (17) Ths ndcates that the dsperson parameter has a negatve relatonshp wth the varance of µ(θ k ). In GLMs wth a random effect, the mean can be expressed n the form: µ (U k ) = µ U k 23
where µ s gven by the ordnary ratng factors and U k denotes the the random effect on k:th level. We denote the so called canoncal lnk functon by h( ). Based on the results n the prevous secton, we can obtan the followng (Ohlsson and Johansson, 2003b): We defne the response varable Y k and E(Y k U k ) = µ U k. Condtonng on U k = u k, the Y k follow a Tweede model wth 1 p 2 and Θ = h(u k ) follows the natural conjugate dstrbuton where α > 0 and δ > 0, then the optmal predctor of U k s of the form: û k = E(U k Y k ), and s gven by û k = w k y k /µ p 1 + φα w k µ 2 p + φα (18) 3.2 Estmaton of the α We are nterested n the estmaton of the dsperson parameters n GLMs and now focus on the addtonal dsperson parameter α. In ths secton, two methods of estmatng α wll be presented, startng wth maxmum lkelhood estmatons n the margnal dstrbuton of Y k. Then an alternatve method proposed by Ohlsson and Johansson(2003b) s ntroduced. We assume that the response varable Y k U k follows a Tweede model. 3.2.1 ML Estmaton of α For p = 1 or p = 2 n the Tweede model, t s possble to derve an explct expresson for the margnal densty of Y. The ML estmator can then be obtaned as the soluton to the ML equatons. For p=2,.e. V (µ) = µ 2, accordng to Ohlsson & Johansson (2002, unpublshed), the ML equaton s: 1 K k [ α + 1 α νw ].k + α + 1 νw.k ȳk + α 1 [ νw.k ȳ ] k + α log K k α + 1 [Ψ(νw.k + α + 1) Ψ(α + 1)] = 0 K k 24
where K denotes the total number of classes of the mult-level factor, ν = 1/φ and y k = y k /µ k. Usng the estmated α we can then predct the random effect U k. The estmaton results of α depends partly on ˆφ, as we can tell from the expresson above. Thus the estmate of φ wll affect the qualty of the estmate of α when we use the ML estmator. 3.2.2 An Alternatve Estmaton Method Accordng to Ohlsson and Johansson (2003b), under the assumpton of Tweede models, one can prove that α = E(µ(Θ)p ) V ar(µ(θ)) where Θ = h(u). We now consder separate estmaton of σ 2 = φe(µ(θ) p ) and σ 2 Θ = V ar(µ(θ)), whose rato s the term φα. From equaton 18 we see that wth the αφ we can predct U k drectly. In another words, we do not need to estmate α and φ separately to obtan Ûk. An estmator of σ 2 2003b) can be obtaned as follows (Ohlsson and Johansson, ˆσ 2 k = 1 I k 1 ( ) 2 w k µ 2 p Yk ū k µ where I k s the number of observatons n class k and ū k s the weghted average of y k /µ : (w k µ 2 p )y k /µ ū k = w k µ 2 p Weghng ˆσ k 2 together wth weghts I k 1 we get the estmator as: ˆσ 2 k (I k 1)ˆσ k 2 = k (I k 1) An estmator of σu 2 s gven by by the followng expresson: k w k µ 2 p ˆσ 2 U = k (ū k 1) 2 Kˆσ 2 w k µ 2 p 25
The estmator of αφ can be expressed as: αφ = ˆσ 2 /ˆσ 2 U. It can be shown that gven µ, ˆσ 2 and ˆσ 2 U are unbased estmators of σ 2 and σ 2 U respectvely. 3.2.3 Estmaton Algorthm The estmaton algorthm used for estmatng U k follows (Ohlsson and Johansson, 2003b): can summarzed as the 0. Set the ntal value of u k as 1 for all k; 1. Run SAS Proc Genmod, wth log(u k ) as offset varable, to get ˆµ ; 2. Estmate α usng the ˆµ from step 1; 3. Compute û k usng the estmates of step 1 and step 2; 4. Repeat step 1-3 untl convergence; 3.3 Applcaton to Car Insurance The applcaton of GLMs to car nsurance wll be extended by ncludng a random effect. The pont of nterest here s the estmaton of α. We consder bascally two estmaton methods. The frst s to estmate φ as before and α usng the ML estmator n the margnal dstrbuton of Y. The other method s to use the alternatve estmator n secton 3.2.2. The applcaton to real nsurance data wll be complemented by a smulaton study. 3.3.1 Emprcal Study We use the same data as before wth the dfference that we ntroduce a new varable car model as a mult-level factor U k and choose dfferent ratng factors from the prevous model. There are around 2000 dfferent car models, 26
.e. U k has about 2000 classes. The new model can be expressed as follows: µ (u k ) = E(Y U k = u k ) = γ 0 γ 1() γ 2()...γ j() u k where the parameter γ j() denotes the relatvty for the :th level wth respect to the j:th ratng factor. A study s made for each of the four dfferent covers. It s worth notcng that the ML estmator of α depends partly on the value of ˆφ, whch can be obtaned wth three dfferent methods: ML, Pearson and devance. We are gong to use all of these methods to estmate φ and study how they affect the estmaton of α. However, wth the alternatve methods of estmatng U k, we consder αφ as a whole, whch means that the results wll be the same no matter whch method we use to estmate φ. The estmaton results for four covers are shown n the tables 11-14: Wthout U k Wth U k ML Wth U k Alt ˆφ ˆφ αφ αφ ML 0,919 0,875 9,338 17,913 Devance 1,051 0,997 11,797 17,913 Pearson 1,449 1,194 16,397 17,913 Table 11: Estmaton of αφ for the cover Hull n the GLM wth the random effect. The results are obtaned by two methods, ML and the alternatve method, where ML estmator produces three dfferent estmates due to the dfferent methods of estmatng correspondng φ and s obtaned by multplyng ˆφ wth ˆα ML. The alternatve estmator does not depend on ˆφ. Wthout U k Wth U k ML Wth U k Alt ˆφ φ αφ αφ ˆ ML 1,055 1,003 15,054 29,435 Devance 1,227 1,163 19,645 29,435 Pearson 2,002 1,647 37,687 29,435 Table 12: Estmaton of αφ for the cover Mer n the GLM wth random effect. Frst of all, we study the ML estmator of α. Snce we have obtaned three dfferent estmates for each ˆα due to dfferent methods of estmatng φ, we are nterested n fndng out whether these three estmates get along wth 27
Wthout U k Wth U k ML Wth U k Alt ˆφ φ αφ αφ ML 1,193 1,075 3,971 22,524 Devance 1,408 1,252 4,863 22,524 Pearson 3,942 5,778 22,774 22,524 Table 13: Estmaton of αφ for the cover Partal kasko n the GLM wth random effect where the extreme values have already been deleted. Wthout U k Wth U k ML Wth U k Alt ˆφ ˆφ αφ αφ ML 1,371 1,332 16,098 162,738 Devance 1,649 1,605 29,710 162,738 Pearson 3,508 3,475 1062,704 162,738 Table 14: Estmatons of the αφ n the GLM for the cover TPL wth truncatons on the level 200 000 SEK. each other. The tables 11-14 show that the ˆ αφ wth Pearson ˆφ devates qute much from the other two estmates and values of ˆφ d and ˆφ m are relatvely close to each other. Ths can be seen even more clearly n the covers Partal Kasko and TPL. Comparng estmaton results between the ML and the alternatve method, we see that the estmates of αφ obtaned by alternatve method are more close to the ML-estmates wth ˆφ p for the covers Hull, Mer as well as Partal kasko. For TPL, the estmates wth alternatve method dffers qute much from all the ML estmates. It seems that the TPL data are so skewed that random effect predcton s not possble n that case. Also wth ˆ αφ = 163 all Û k wll be close to 1. From secton 2.2.2, we have learned that cover TPL has large varance and skewness. Besdes ˆφ p s very senstve to extreme values. Ths mght be an explanaton for the strange estmaton results for αφ for TPL. 28
3.3.2 Smulaton Study In order to gve more nsght nto the propertes of the estmators of α, we performed a smulaton study. The man purpose of smulatons s to compare the estmated α wth the true value, n whch way we can get some dea of how well dfferent estmaton methods work. For the sake of smplcty, we choose to create a data set wth only one fxed effect and one random effect. To begn wth, we assume that Y U k Gamma(µ U k, φ) where E(Y U k ) = µ U k. The correspondng natural conjugate dstrbuton f Θ (θ) s of the form ( ) θδ + log( θ) f Θ (θ) = exp + d 1/α where the canoncal lnk functon can be expressed as Θ = 1/U k. It can be shown that U k InverseGamma(α + 1, α) (for a proof see the Appendx A4). To generate the data Y, we take the followng steps: Set the true values of the fxed factors µ (See table 15) Set the true values of φ = 2 and α = 12 Smulate varable U k InverseGamma(α + 1, α) Smulate varable Y U k Gamma(µ U k, φ) We suppose that the fxed effect has only fve levels, µ for = 1, 2, 3, 4, 5 that take the followng values: We assume also that the mult-level factors has totally 1110 levels wth the number of observatons for each level gven by the followng table: Thus we have 6 000 observatons on each level and totally 30 000 observatons. We ft the extended GLMs wth the random effect U k nto the 29
level = 1 2 3 4 5 µ 1000 1240 1130 1080 1020 Table 15: Values of µ on level 1, 2, 3, 4 and 5. The true values of µ are chosen based on the estmaton results n the models wthout random effect n secton 2. level k= 1-10 11-110 111-1110 n k 200 20 2 Table 16: The number of observatons for each k on the :th level where k = 1, 2,...1100 and = 1...5. smulated data for 5 000 tmes and estmate the parameter α (or αφ) as well as the correspondng φ wth the methods descrbed n the prevous sectons. We then obtan the means and varances of estmates of both α (or αφ) and φ and then compare the means wth the true values. The estmaton results are showed n the tables 17 and 18: φ estmaton Mean of ˆφ Std.Dev of ˆφ Mean of αφ Std.Dev of αφ ML 1,981 0,014 23,265 1,969 Devance 2,532 0,020 45,092 4,314 Pearson 1,929 0,028 25,482 2,669 Table 17: Means and standard devatons of ML estmator of αφ wth dfferent methods of estmatng the parameter φ n the GLM where the response varable average clam amount s gamma dstrbuted. The true value of αφ s 24. Comparng the three ML estmators we see that the best result s obtaned when we use ˆφ m where the mean value of αφ s most close to the true value whle the standard devaton s the smallest. Wth the alternatve method, the mean value of the αφ ˆ s also around the true value but wth a larger standard devaton. Therefore we can conclude that the ML estmaton of α wth ˆφ m s the most preferable n ths case. In practce, the dstrbuton of response varable s often skewly dstrbuted, as the case for covers Partal Kasko and TPL. In the followng, we are gong 30
Mean of αφ Std.Dev of αφ 26,630 2,866 Table 18: Means and standard devatons of the alternatve estmator of αφ n the GLM wth random effect where the response varable average clam s gamma dstrbuted. The true value of αφ s 24. to generate a data whch follows the Generalzed Pareto dstrbuton though we stll assume n the GLMs that t s gamma dstrbuted. The random effect U k s stll nverse gamma dstrbuted. We are gong to compare all the estmators of α when the assumpton of dstrbuton s not proper. We choose the same true values of α and φ. The results are shown n the tables 19 and 20: φ estmaton Mean of ˆφ Std.Dev of ˆφ Mean of αφ Std.Dev of αφ ML 1,209 0,009 11,502 0,937 Devance 1,434 0,013 14,856 1,205 Pearson 1,790 0,078 21,820 4,363 Table 19: Means and standard devatons of ML estmator of αφ wth dfferent methods of estmatng the parameter φ n the GLM where the response varable average clam amount s generalzed pareto dstrbuted. The true value of αφ s 24. Mean of αφ Std.Dev of αφ 22,175 4,458 Table 20: Means and standard devatons of the alternatve estmator of αφ n the GLM wth random effect where the response varable average clam s generalzed pareto dstrbuted. The true value of αφ s 24. When the dstrbuton assumpton has been changed, ML estmate of α wth ˆφ m becomes much worse whle ML estmate of α wth ˆφ p s stll close to the alternatve estmate and the true value. 31
4 Concluson In the GLMs wthout random effect, there s only one dsperson parameter φ. We have dscussed three methods of estmatng φ n two dfferent stuatons. In the frst case, where the GLM fts well to our emprcal data, the ML estmator of φ turns out to be unbased wth 95% confdence. Both Pearson and Devance estmators are based. Meanwhle, the Devance estmates are always larger than the ML estmates, whch has been shown both theoretcally and emprcally. The Pearson estmator s pretty good n the sense that the value of the estmate s qute close to the true value. In the second case, when the dstrbutonal assumpton s doubtful, we fnd that the ML estmator s no longer unbased. However, the Pearson estmator s robust because the estmate does not change much even when the dstrbuton assumpton has been changed. Another fndng s that the Pearson estmator s very senstve to extreme values. When we delete or truncate the extreme values, the Pearson estmate decreases dramatcally as t should. On the other sde, the Devance and ML estmates do not change much after deleton or truncaton. In the GLMs wth random effect, there s an addtonal dsperson parameter, α. In ths paper, two estmaton methods, ML and the alternatve method have been ntroduced to estmate the quantty αφ, whch can be used drectly to calculate the random effect U k. The ML estmator s dependent of the φ estmate. It has been shown that when the dstrbutonal assumpton s sensble, all of the ML estmators are based wth 95% confdence. However, the ML estmates wth ˆφ m and ˆφ p are qute close to the true value whle the ML estmates wth ˆφ d devates much from the true value. After we change the assumpton, the estmate wth ˆφ m becomes worse and ts value s close to the one of ML estmates wth ˆφ d. The ML estmates wth ˆφ p s affected comparatvely less and the value of the estmate s stll relatvely close to the true value. Ths s n accordance wth the results n the GLMs wthout random effects, where the ˆφ p s the most robust. Comparng the ML wth the alternatve method, we fnd that except for the cover TPL, the value of 32
the alternatve estmate gets along wth the ML estmates wth ˆφ p no matter whether the dstrbutonal assumpton s proper or not. Ths s the case n both emprcal and smulaton studes. However, a dsadvantage of these two estmators s that the standard devatons of the estmates are large. When the value of ˆ αφ s large, the ûk s convergent to 1, whch mples that the random effect does not affect the model substantally and even can be gnored. Ths could possbly explan the abnormal estmatons of ˆ αφ for TPL where the random effect car model does not have much mportance on the response varable, average clam amount. In such cases, nether ML nor the alternatve estmators yeld sensble estmatons. In summary, we recommend the Pearson estmator for estmatng φ wth the reason that t s the most robust aganst the dstrbutonal assumpton snce n practce t s often dffcult to fnd a canoncal dstrbuton that fts the data well, partcularly when there are large values. Concernng the α estmaton n the model wth a random effect, t turns out that the ML estmator wth ˆφ p and the alternatve estmator are superor to the others, though both are based, the estmates are robust and do not devate much from the true value. 33
5 Reference P.McCullagh and J.A.Nelder (1997): Generalzed Lnear Models. Esbjörn Ohlsson and Björn Johansson (2003a): Prssättnng nom sakförsäkrng med Generalserade lnjära modeller. Esbjörn Ohlsson and Björn Johansson (2003b): Credblty theory and GLM revsed Gauss M. Cordero and P.McCullagh (1991): Bas Correcton n Generalzed Lnear Models Journal of the Royal Statstcal Socety. Seres B, Volume 53, Issue 3 629-643. Nelder.J.A and Verrall, R.J. (1997): Credblty Theory and Generalzed lnear models. ASTIN Bulletn, Vol 27:1, 71-82. 34
6 Appendx A Appendx A1 : GLM Re-parametrzaton of gamma dstrbuton wth The gamma dstrbuton belongs to the GLMs and can be expressed n terms of two parameters µ and φ. Though t takes dfferent look, t s completely consstent wth the densty functon of gamma dstrbuton n terms of α and β, whch we are more famlar wth. By some smple manpulatons, we can reparametrze the densty functon by α and β: ( ) y /µ log(µ ) f Y (y ) = exp + log(w y /φ)w /φ log(y ) log Γ(w /φ) φ/w = e wβy ( ) αw β (αwy) αw y 1 1 α Γ(αw) = (wβ)αw Γ(αw) yαw 1 e βwy The last expresson remnds us of the densty functon of gamma dstrbuton: f(x) = βα Γ(α) xα 1 e βx where we have α = αw and β = βw n ths case. The relaton between these two parametrzaton can be expressed as µ = α/β and φ = 1/α 35
Appendx A2 : Proof of the ML equaton for the gamma dstrbuton l(µ ; φ) = n ( ) ( ) w φ log w w + φµ φ 1 log(y) w ( ) y w log Γ φµ φ = l n φ = w ( φ log ( w ) w 2 φµ φ w 2 φ log(y) + w y Ψ 2 φ 2 µ ( ) ( w w ) φ φ 2 Settng l/ φ = 0 = 2 n w (log ( ) w Ψ φ ( )) w = 2 φ ( ) n µ w (log y + y ) µ µ Where the rght sde of the equaton equals the devance for the gamma dstrbuton. 36
Appendx A3 : An Approxmate Form of φ d wth Taylor Expanson Taylor expanson: f(x) = f(a)+f (a)(x a)+ f (a) 2! (x a) 2 + f (3) (a) 3! (x a) 3 +...+ f (n) (a) (x a) n n! Applyng Taylor expanson to the functon f(y ) = w log( ˆµ /y ) wth x = y and a = ˆµ f (y ) = w y f (y ) = w y 2 f (3) (y ) = 2 w y 3 = f(y ) = w log(ˆµ /y ) w 2µ 2 = ˆφ d = 2 n r + 1 n r = 1 n r f(y ) = 2 n r w n r log(ˆµ /ˆµ ) 1 n r ( ) 2 y ˆµ w 1 ˆµ (y ˆµ ) 2 2 w (y 6ˆµ 3 ˆµ ) 3 ( ) ˆµ w log y ) ( y ˆµ w ˆµ n r ( 2w y ˆµ 3 ˆµ ( y ˆµ ( ) 2 y ˆµ w 1 ˆµ n r 2w 3 where we use the fact that w (y ˆµ )/(ˆµ ) = 0 ˆµ ) 3 ) 3 37
Appendx A4 : Proof of Inversely Gamma Dstrbuton If we have a varable X followng a gamma dstrbuton, the varable Y=1/X s nverse gamma dstrbuted. In other words, to prove that U k follows a nverse gamma dstrbuton, we only need to prove Θ = Θ = 1/U k s gamma dstrbuted. We have densty functon of Θ wth the form: ( ) θ + log( θ) f Θ (θ) = exp + d 1/α F Θ (θ ) = P (Θ θ ) = P ( Θ θ ) = 1 P (Θ θ ) = 1 F Θ ( θ ) ( θ = f Θ (θ ) = f Θ ( θ + log(θ ) ) ) exp = θ α e αθ 1/α Ths ndcates that Θ Gamma (α + 1, α) and hence U k InverseGamma (α + 1, α). 38
7 Acknowledgement I would lke to extend my sncere grattude and apprecaton to many people who make ths master thess possble. Frst of all, great thanks are due to my supervsors, Esbjörn Ohlsson and Björn Johansson, who have been provdng me wth a great many nsprng deas and nstructons on both content and structure of ths thess. Thanks to ther partcpance, t has become a fully enjoyable learnng process to wrte the thess. I am hghly ndebted to Actuary Department at Länsförskrngar, Sak, whose assstance s vtal for ths thess work. A sncere thank to the head of Actuary Department, Eva Blomberg for provdng me such a great opportunty and also specal thanks to Gunde Brandn and Fredrk Johansson who have been generously sharng knowledge and experence wth me. I would also lke to acknowledge wth great apprecaton facultes of Mathematcal Statstcal Insttuton at Stockholm Unversty. Thanks a lot for leadng and gudng me the journey of exploraton of the mathematcal and statstcal world, whch s extraordnary nterestng and challengng. Last but not the least, I would lke to send my most sncere grattude to my famly: mother Mng Meng, father Yan Hou, sster Nannan Lundn and my husband Yaohua Yu, who are always supportve to me. 39