B. Hall Intro to Frailty Models

Embed Size (px)

Citation preview

  • 8/18/2019 B. Hall Intro to Frailty Models

    1/13

    STA635 Project by Benjamin Hall

  • 8/18/2019 B. Hall Intro to Frailty Models

    2/13

    Cox proportional hazards

    modelModel hyi !t" # h$!t"e%&%'(((' )&) is the hazard

    *+nction o* the ith indi,id+al

    Ass+mption The hazard *+nction *or eachindi,id+al is proportional to the basine hazard-h$!t"( This ass+mption implies that the hazard*+nction is *+lly determined by the co,ariate

    ,ector(Problem There may be +nobser,ed

    co,ariates that ca+se this ass+mption to be,iolated(

  • 8/18/2019 B. Hall Intro to Frailty Models

    3/13

    Siml+ation .x /nobser,ed

    co,ariateConsider a sit+ation 0ith the *ollo0in1 pop+lation

    2b,io+sly r+1 A is e4ecti,e *or the entirepop+lation(

    B+t 0hat happens in the Cox Model i* the 1ro+p is+nobser,able

    Group ProportionofPopulation

    HazardRate withplacebo

    HazardRate withDrug A

    % $7 % (5

    8 $7 8 %

    3 8$7 %$ 9

  • 8/18/2019 B. Hall Intro to Frailty Models

    4/13

    Sim+lation .xample-contin+ed:et;s sim+late this example and apply the Cox

    model

    Ha,e < sim+late %$$ people accordin1 to thepre,io+s table;s probabilities and randomlyassi1n them to treatment or placebo

    =or each person- ha,e < sim+late > o*

    incidents 0ithin period o* len1th %( At the endo* period o* len1th % ri1ht?censorin1 occ+rs(

  • 8/18/2019 B. Hall Intro to Frailty Models

    5/13

    Sim+lation .xample-contin+edHere is some o* the data 1enerated by < !see

    @nal slide *or code"

    id group treat time status

    %-

    % 3 $ (39 %

    8-

    % 3 $ ($ %

    3-

    % 3 $ (83 %

    -

    % 3 $ (%5 %

    5-

    % 3 $ (%% %

    6-

    % 3 $ (9D $

  • 8/18/2019 B. Hall Intro to Frailty Models

    6/13

    Sim+lation .xample-contin+edEo0 0e r+n coxph on o+r data

     F my@t%Call

    coxph!*orm+la # S+r,!time- stat+s" G treat"

      coe* exp!coe*" se!coe*" z p

    treat ?$(%89 $(99 $(%% ?%(% $(8

    :i)elihood ratio test#%(3 on % d*- p#$(88 n# 5

    Eotice that the :

  • 8/18/2019 B. Hall Intro to Frailty Models

    7/13

    Sim+lation .xample-contin+ed The problem is that 0e ha,e hetero1eneity in

    the data d+e to the +nobser,able 1ro+ps(

    Since 0e cannot incl+de 1ro+p in o+r model-the ass+mption o* proportional hazards is,iolated(

    hat can 0e do to sol,e this problem /se a

    *railty model(

  • 8/18/2019 B. Hall Intro to Frailty Models

    8/13

    =railty Model=railty models can help explain the +nacco+nted

    *or hetero1eneity(

    =railty Model hyi !t" # z  h$!t"e%&%'(((' )&) is the

    hazard *+nction o* the ith indi,id+al

     The distrib+tion o* z is speci@ed to be- say-Iamma( !Eote z m+st be non?ne1ati,e since

    the hazard is non?ne1ati,e("Jn this sit+ation- the shared *railty model is

    appropriate- that is m+ltiple obser,ations o* thesame indi,id+al al0ays has the same ,al+e o* z(

  • 8/18/2019 B. Hall Intro to Frailty Models

    9/13

    =railty Model in <:et;s apply the *railty model to o+r sim+lated

    dataF my@t8

    Callcoxph!*orm+la # S+r,!time- stat+s" G treat ' *railty!id""

      coe* se!coe*" se8 ChisK = p

    treat ?$(% $(%6$ $(%%% $(95 %($ 3(6e?$%

    *railty!id" D3(9D 3(5 %(e?$5

    Jterations 5 o+ter- % Ee0ton?

  • 8/18/2019 B. Hall Intro to Frailty Models

    10/13

    =railty Model in <Eo0 let;s try implementin1 the *railty model

    to a real data set- the )idnet data set(

    Here are the res+lts *or the re1+lar Cox ModelF )@t%Call

    coxph!*orm+la # S+r,!time- stat+s" G a1e ' sex- data # )idney"

      coe* exp!coe*" se!coe*" z p

    a1e $($$8$3 %($$8 $($$D85 $(88$ $(93$$

    sex ?$(98D3% $(36 $(8D9D5 ?8( $($$55

    :i)elihood ratio test#(%8 on 8 d*- p#$($895 n# 6

    Here the :

  • 8/18/2019 B. Hall Intro to Frailty Models

    11/13

    =railty Model in <Ho0e,er- a *railty model seems applicable in

    this sit+ation since their are m+ltipleoberser,ations !i(e( 8 )idneys" per person( Belo0considers *railty

    F )@t8Call

    coxph!*orm+la # S+r,!time- stat+s" G a1e ' sex ' *railty!id"- data # )idney"

      coe* se!coe*" se8 ChisK = p

    a1e $($$585 $($%%D $($$99 $(8 % $(66$$$

    sex ?%(59D $(6$6 $(358$ %%(D % $($$$5

    *railty!id" 83(% %3 $($$$$Jterations o+ter- D Ee0ton?

  • 8/18/2019 B. Hall Intro to Frailty Models

    12/13

  • 8/18/2019 B. Hall Intro to Frailty Models

    13/13

    < Codelibrary!s+r,i,al"

    >I.ETJM.

    1entime Q? *+nction!1ro+p- treat" R

    i* !1ro+p ## %" R

    ret+rn !ro+nd!rexp!%- %?!(5treat""-8""

    i* !1ro+p ## 8" R

    ret+rn !ro+nd!rexp!%- 8?treat"-8""

    i* !1ro+p ## 3" R

    ret+rn !ro+nd!rexp!%- %$?8treat"-8""

    > P.