c25 Meyers

download c25 Meyers

of 20

Transcript of c25 Meyers

  • 8/12/2019 c25 Meyers

    1/20

    PredictiveModeling

    with

    the

    TweedieDistribution

    GlennMeyers

    ISOInnovativeAnalytics

    CASAnnual

    Meeting

    Session

    C

    25

    November16,2009

  • 8/12/2019 c25 Meyers

    2/20

    Background The

    Collective

    Risk

    Model

    Describeasasimulationalgorithm

    1.Selectarandomnumberofclaims,N

    2.Fori=

    1to

    N

    Selectarandomclaimamount,Zi

    3.TotalLoss=1

    N

    i

    i

    Z=

  • 8/12/2019 c25 Meyers

    3/20

    History

    1980Discussion

    Paper

    Program

    GlennMeyers

    Usedcollective

    risk

    model

    simulation

    for

    retrospectiverating.

    ShawMong

    UsedFouriertransformstocalculatecollective

    riskmodelprobabilitiesWITHOUTsimulation.

    Assumedthat

    claim

    severity

    had

    agamma

    distribution.

    LatergeneralizedbyHeckmanandMeyers(1983)

  • 8/12/2019 c25 Meyers

    4/20

    History Statistical

    Community

    (1984)

    UniversityofIowaDepartmentofStatistics

    Poissonfrequency,

    gamma

    severity

    Usedinorderrestrictedinference

    Tweediepublishespaper

    Tweedie,M.

    C.

    K.,

    An

    Index

    which

    Distinguishes

    betweenSomeImportantExponentialFamilies, inStatistics:ApplicationsandNewDirections,Proceedings

    of

    the

    Indian

    Statistical

    Golden

    Jubilee

    InternationalConference,J.K.GhoshandJ.Roy(Eds.),IndianStatisticalInstitute,1984,579604.

  • 8/12/2019 c25 Meyers

    5/20

    Usesof

    Collective

    Risk

    Model

    CalculatingAggregateLossDistributions

    Retrospectiverating

    Reinsurance

    Enterpriseriskmanagement

    Fittingmodels

    of

    insurance

    loss

    data

    Simulationisofnohelpinmaximumlikelihoodestimation

    TheTweedie

    distribution

    is

    amember

    of

    the

    exponentialdispersionfamilyandthuscanbeusedinaGLM

  • 8/12/2019 c25 Meyers

    6/20

    Tweedie

    as

    a

    Compound

    Poisson

    Model ClaimCountN~Poisson()

    ClaimSeverityZ~Gamma(,)KPWLossModelsparameters

    TranslateintostandardTweedieparameters

    Thisisthesameaspredictedbywellknown

    collectiverisk

    model

    variance

    formulas

    ( )2

    12, ,

    1 2

    pp

    pp

    += = =

    +

    [ ] ( )2 Withsomealgebrawecanseethat

    1p

    Var Y = = +

  • 8/12/2019 c25 Meyers

    7/20

    Interpretingthe

    Tweedie

    p

    Forp=

    1,

    the

    Tweedie

    is

    called

    the

    OverdispersedPoissondistribution

    Claimamountsareconstant

    FormostP/Cinsuranceapplications

    CV>1whichimpliesp>1.5

    2 1, CVforgammadistribution=

    1

    p +=

    + As , CV 0and 1p

  • 8/12/2019 c25 Meyers

    8/20

    IllustratingtheEffectofp

    Simulationvs

    Rs

    tweedie package

  • 8/12/2019 c25 Meyers

    9/20

    IllustratingtheEffectofp

    Simulationvs

    Rs

    tweedie package

  • 8/12/2019 c25 Meyers

    10/20

    TweedieDensity

    Function

    Dispersionmodelform DunnandSmyth(2008)

    Devianced(y,)

    ( ) ( ) ( )1

    | , , | , , exp ,2

    f y p f y p y d y

    =

    ( ) ( ) ( )

    2 1 2

    , 21 2 1 2

    p p p

    y yd yp p p p

    = +

  • 8/12/2019 c25 Meyers

    11/20

    GLMswith

    the

    Tweedie

    Distribution

    Maximizeloglikelihood MinimizeDeviance

    GLMsfocus

    only

    on

    estimating

    pandareeithergiven,orestimatedoutsidethe

    GLMframework.

    Unnecessarytoevaluatef(y|p,y,)VeryfortunateforGLM

    NothelpfulformoregeneralmodelsDunnandSmyth(2005,2008)evaluatef(y|p,y,)using

    complicatedmath

    involving

    series

    expansions

    and

    Fourierinversion. Itisalsocomputationallyslow.

    DunnistheauthoroftheTweediepackageinR.

  • 8/12/2019 c25 Meyers

    12/20

    ProblemwiththeCompoundPoisson

    Interpretationof

    the

    Tweedie

    Distribution

    Aconstantwillforceanartificialrelationshipbetween

    the

    claim

    frequency,

    ,ortheclaimseverity,. UsesofTweediedistribution

    Desireto

    build

    pure

    premium

    models

    where

    claim

    frequencyandclaimseverityhavetheirownindependentvariables.

    MonteCarloMarkovChainsimulations

    Needspeed

    )

    ( )

    21 2 1

    2 2 2

    pp p p

    p p p

    = = =

  • 8/12/2019 c25 Meyers

    13/20

    RearrangeCalculationof

    TweedieDensity

    Objectivesofmethod

    Allowtovaryasaninput

    Computationallyfast

    Keeppfixed

    Currentapplications

    can

    reliably

    estimate

    p.

    Experienceindicatesthatpurepremiumestimatesarerelativelyrobustwithrespecttop.

    Becareful

    if

    accurate

    estimates

    of

    frequency

    are

    required.

  • 8/12/2019 c25 Meyers

    14/20

    TweedieDensity

    Function

    Dispersionmodelform DunnandSmyth(2008)

    Firsttermf(y|p,y,)Slowtocalculatewhencalled

    Notany

    slower

    for

    calling

    with

    along

    vector

    y

    ( ) ( ) ( )1

    | , , | , , exp ,2

    f y p f y p y d y

    =

  • 8/12/2019 c25 Meyers

    15/20

    DunnSmythRescaling(2008)

    Forgiven,,usetheaboveformulastocalculate,andp.

    Findashortandfastapproximationforf(y|p,y,1)

    Givenf,

    calculate

    kand

    use

    Dunn

    Smyth

    rescaling

    andtheapproximationtocalculatefory>0:

    Fory=0,set

    ( ) ( )2| , , | , , pf y p k f ky p k k =

    ( ) ( )

    = =

    1

    2

    Set

    ,then

    | , , | , ,1

    p

    k f y p y k f ky p ky

    ( )

    ( )

    2

    0| , , exp

    2

    p

    f p

    p

    =

  • 8/12/2019 c25 Meyers

    16/20

    Approximatinglog(f(y|p,y,1))

    Calculate, log(f(y|p,y,1))usingdtweedie,ONCE

    withalong

    vector

    yfixed.

    Find3valuesinthevectoryfixedthatareclosetoy.

    Use

    divided

    differences

    interpolation

    to

    approximatelog(f(y|p,y,1)).

    Increaseaccuracybyputtingmorepointsinyfixed.

  • 8/12/2019 c25 Meyers

    17/20

    Accuracywith

    10,000

    yfixeds

  • 8/12/2019 c25 Meyers

    18/20

    RCode

    for

    Last

    Plot

    library(statmod)

    library(tweedie)

    p=1.5

    num=10000log.ybot=log(.01)

    log.ytop=log(100)

    del=(log.ytoplog.ybot)/num

    log.y1=seq(from=log.ybot,to=log.ytop,length=num)

    front=dtweedie(exp(log.y1),p,exp(log.y1),1)

    #

    ldtweedie.front=function(y,lyf,front){

    lf=log(front)

    ly=log(y)

    del=lyf[2]lyf[1]

    low=pmax(floor((ly lyf[1])/del),1)

    d01=(lf[low+1]lf[low])/del

    d12=(lf[low+2]lf[low+1])/del

    d23=(lf[low+3]lf[low+2])/del

    d012=(d12

    d01)/2/deld123=(d23d12)/2/del

    d0123=(d123d012)/3/del

    ld=lf[low]+(lylyf[low])*d01+(lylyf[low])*(lylyf[low+1])*d012+

    (lylyf[low])*(lylyf[low+1])*(lylyf[low+2])*d0123

    return(ld)

    }

    #

    ldtweedie.scaled=function(y,p,mu,phi){

    dev=y

    ll=y

    k=(1/phi)^(1/(2p))

    ky=k*y

    yp=ky>0

    dev[yp]=2*((k[yp]*y[yp])^(2p)/((1p)*(2p))k[yp]*y[yp]*

    (k[yp]*mu[yp])^(1p)/(1p)+(k[yp]*mu[yp])^(2p)/(2p))

    ll[yp]=log(k[yp])+ldtweedie.front(ky[yp],log.y1,front)dev[yp]/2

    ll[!yp]=mu[!yp]^(2p)/phi[!yp]/(2p)

    return(ll)

    }

    #

    runif(1000,min=0,max=exp(log.ytop))

    front.true=log(dtweedie(y,p,y,1))

    front.int=ldtweedie.front(y,log.y1,front)

    plot(log(y),front.intfront.true)

    rug(log(y))

    summary(front.intfront.true)

  • 8/12/2019 c25 Meyers

    19/20

    Remarks

    f(y|p,y,)and{i}canbecalculatedinRwiththe

    tweediepackage.

    logofTweediedensitiescanquicklycalculatedin

    closedformusingthecubicapproximation.

    Fastcalculationofloglikelihoodisnecessaryfor

    BayesianestimationusingtheMCMCsimulations.

    Coefficients

    of

    the

    cubic

    approximation

    allow

    for

    easycodinginSASandExcelforMLEestimationof.

  • 8/12/2019 c25 Meyers

    20/20

    Dunn,P.K.&Smyth,G.K.(2008).EvaluationofTweedieexponentialdispersion

    modeldensitiesbyFourierinversion.StatisticsandComputing,18,7386.