uncertainty analyses

16
1 Uncertainty Analyses Latin hypercube method implemented in POHEM Tamoxifen example Bill Flanagan Philippe Finès Feb 9, 2010

Upload: inez-logan

Post on 01-Jan-2016

27 views

Category:

Documents


0 download

DESCRIPTION

Uncertainty Analyses. Latin hypercube method implemented in POHEM Tamoxifen example Bill Flanagan Philippe Finès Feb 9, 2010. Generating lognormal deviate. 1) Computation of sigma for ( i = 0; i < SIZE( TAMOXIFEN_RR_AGE_GROUP ); i++ ) { - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Uncertainty Analyses

1

Uncertainty Analyses

Latin hypercube method implemented in POHEM

Tamoxifen example

Bill FlanaganPhilippe FinèsFeb 9, 2010

Page 2: Uncertainty Analyses

2

Generating lognormal deviate

• 1) Computation of sigmafor ( i = 0; i < SIZE( TAMOXIFEN_RR_AGE_GROUP ); i++ ) {

for ( j = 0; j < SIZE( TAMOXIFEN_RELATED_DISEASES ); j++ ) {if ( TAMOXIFEN_CALCULATE_SIGMA )

{mTamoxifen_RR_STD_LN[i][j] = (( log( TAMOXIFEN_RRISK[i][j][2] ) - log( TAMOXIFEN_RRISK[i][j]

[1] ) ) / TAMOXIFEN_RR_CI ) / 2;

ex: (UCI-LCI) /1.96/2}else

{mTamoxifen_RR_STD_LN[i][j] = TAMOXIFEN_RR_SIGMA[i][j];}}}• 2) Generation of a lognormal random variable

/* The RR is assumed to be lognormal. When calculating the mean for the lognormalfrom a normal there is an adjustment factor of exp(sigma^2 / 2) */mTamoxifen_RR[s][i][j] = TAMOXIFEN_RRISK[i][j][0] / exp( pow( mTamoxifen_RR_STD_LN[i][j], 2) / 2 )

* exp( mTamoxifen_RR_STD_LN[i][j] * dRand );

Page 3: Uncertainty Analyses

3

Generating lognormal deviate

• Normal distribution– mean= , sd=– draw Z ~ N(0,1)

X = +Z* ~ N(,²)• Lognormal distribution

– Y ~ lognormal(,²) ln(Y)~N(,²) – mean=exp(²/2)=exp() exp(²/2) , – sd=sqrt[(exp(²)-1)(exp(2²))] – draw Z ~ N(0,1)

X = exp(+Z*)/exp(²/2) = exp() exp(Z*)/exp(²/2)~ lognormal(,²)

Page 4: Uncertainty Analyses

4

Interpreting and Using RCT results

• RCT tamoxifen trial– control vs tamoxifen

• TAMOXIFEN_RRISK – by age, disease and estimate (mean, lci, uci)– model generated rTamoxifen_RR

Page 5: Uncertainty Analyses

5

Page 6: Uncertainty Analyses

6

Using Subsamples

• Subsamples– when a person is first created in POHEM they are randomly

assigned to a subsample– subsamples generated automatically by Modgen– user picks the total number in Scenario Settings ( eg 40)

• Presimulation– generate a vector of RR for each subsample

• RR from lognormal distribution defined by RCT mean and CI – by age group and disease

• CaseSimulation– during code execution of an individual simulated life course– the risk equation for each disease is multiplied by the RR given

the person’s subsample (and age)– use GetCaseSample() in code to know person’s subsample

Page 7: Uncertainty Analyses

7

Looking in the code

• Presimulation code– can be in any mpp– see Otherhealth.mpp

• starts in line 18 but important part in line 369

Page 8: Uncertainty Analyses

8

Presimulation codefor ( s = 0; s < SIZE( MAX_SUBSAMPLES ); s++ ) {

for ( i = 0; i < SIZE( TAMOXIFEN_RR_AGE_GROUP ); i++ ) { for ( j = 0; j < SIZE( TAMOXIFEN_RELATED_DISEASES ); j++ ) {

/* The RR is assumed to be lognormal. When calculating the mean for the lognormalfrom a normal there is an adjustment factor of sigma^2 / 2The reference for this is the Handbook of the Normal DistributionPatel and Read page 24.*/// We further decided to limit to the 95% confidence interval to avoid outliersdo { dRand = RandDeviate(7); } while ( fabs( dRand ) > 1.96 );

mTamoxifen_RR[s][i][j] = TAMOXIFEN_RRISK[i][j][0]/ exp( pow( mTamoxifen_RR_STD_LN[i][j], 2) / 2 )* exp( mTamoxifen_RR_STD_LN[i][j] * dRand );

}}

}

Page 9: Uncertainty Analyses

9

CaseSimulationvoid Person::StartTamoxifen(){...

for ( i = 0; i < SIZE( TAMOXIFEN_RELATED_DISEASES ); i++ ){

s = GetCaseSample();rr_tamoxifen[i]=mTamoxifen_RR[s][tamoxifen_rr_age_index][i];

}}void Person::BreastCancerCheck(){ ...

bc_relative_risk= ... * rr_tamoxifen[TAM_BREAST];

nProb_breast_incidence = Breast_prob[curtate_age] * bc_relative_risk;

...}

Page 10: Uncertainty Analyses

10

Output

• Export Tables to Excel– in the Output contents window, check each of

the subsamples– one workbook per subsample for each table

• naming convention SUB#_<table name>• plus one series of new tables called trun,

SUB#_trun

– analyse differences in outcomes (e.g. life expectancy) between subsamples in each workbook (manual calculations)

Page 11: Uncertainty Analyses

11

Example: Results on HUI in POHEM-OA from perturbations of

the parametersPhilippe Finès

August 2009

Page 12: Uncertainty Analyses

12

Average HUI, original values and values from 10 realisations of parameters, females

Females

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

OA has not yet been diagnosed

Diagnosis of OA

First Visit to an orthopaedic surgeon(OS)

Second Visit to an orthopaedicsurgeon (OS)

Third+ Visit to an orthopaedicsurgeon (OS)

Primary surgery for OA (max 4)

Revision surgery for OA (max 4?)

All

Orig Sub0 Sub1 Sub2 Sub3 Sub4 Sub5 Sub6 Sub7 Sub8 Sub9 Sub10

Page 13: Uncertainty Analyses

13

Average HUI, original values and values from 10 realisations of parameters, males

Males

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

OA has not yet been diagnosed

Diagnosis of OA

First Visit to an orthopaedic surgeon(OS)

Second Visit to an orthopaedicsurgeon (OS)

Third+ Visit to an orthopaedicsurgeon (OS)

Primary surgery for OA (max 4)

Revision surgery for OA (max 4?)

All

Orig Sub0 Sub1 Sub2 Sub3 Sub4 Sub5 Sub6 Sub7 Sub8 Sub9 Sub10

Page 14: Uncertainty Analyses

14

Average HUI in 2020, original values and some statistics on the values, females

Females, 2020

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

OA has not yetbeen diagnosed

Diagnosis of OA First Visit to anorthopaedic

surgeon (OS)

Second Visit toan orthopaedicsurgeon (OS)

Third+ Visit to anorthopaedic

surgeon (OS)

Primary surgeryfor OA (max 4)

Revision surgeryfor OA (max 4?)

All

Orig Min 5% Mean Median 95% Max

Page 15: Uncertainty Analyses

15

Average HUI in 2020, original values and some statistics on the values, males

Males, 2020

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

OA has not yetbeen diagnosed

Diagnosis of OA First Visit to anorthopaedic

surgeon (OS)

Second Visit toan orthopaedicsurgeon (OS)

Third+ Visit to anorthopaedic

surgeon (OS)

Primary surgeryfor OA (max 4)

Revision surgeryfor OA (max 4?)

All

Orig Min 5% Mean Median 95% Max

Page 16: Uncertainty Analyses

16

Average HUI in 2020, original values, mean and median, females

Females, 2020

0.85

0.68

0.49 0.48 0.49

0.69

0.64

0.820.85

0.68

0.49 0.48 0.49

0.69

0.65

0.82

0.82

0.64

0.85

0.68

0.49 0.48 0.49

0.69

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

OA has not yetbeen diagnosed

Diagnosis of OA First Visit to anorthopaedic

surgeon (OS)

Second Visit toan orthopaedicsurgeon (OS)

Third+ Visit to anorthopaedic

surgeon (OS)

Primary surgeryfor OA (max 4)

Revision surgeryfor OA (max 4?)

All

Orig Mean Median