Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Novel graphical diagnostics for assessing the fit of logistic regression models
Venkata Pavan Kumar Vajjah
Stephen Duffull
University of Otago, Dunedin, New Zealand
Modelling and Simulation Lab, School of Pharmacy
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Outline
• Introduction
• Motivating example
• Aim
• Novel graphical diagnostics
• Simulation study
• Discussion
• Conclusions
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Introduction
• Models for binary data
– Logistic regression (LR) models are used to understand the
relationship between the probability (π) of binary response variable (event or no event) and exploratory variable (dose (D ))
Dββπ
π×+=
− 101
ln
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Introduction
• Model evaluation
– “Do the model’s deficiencies have a noticeable effect on the
substantive inferences?” (Gelman, c 1995)
• Model diagnostics
– Techniques used to examine the adequacy of a fitted model
(Collett 1999)
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Graphical diagnostics used in LR
• Simple binning
– Grouping of measured data into data classes
• Based on dose
• Based on individuals
– Estimate empirical probability and compare it with model
predictions
L=Number of bins; ni =number of individuals in ith bin
}1,0{;...3,2,1;....3,2,1,,1~
1
∈=== ∑=
iji
n
jij
ii ynjLiwherey
nπ
i
( )π̂
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Motivating example venlafaxine
0 5000 10000 150000
100
200
300Number of individuals Unbalanced on X-axis
0 5000 10000 150000
1
Dose
Events
Unbalanced on Y-axis
N=437
Dose= 75-13500 mg
Events=6%
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Simple binning as a “diagnostic”
0 5000 10000 150000
0.5
1
Dose
Probability of seizure
Model 1
Model 2
Bin by individual
Bin by dose
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Aim
• To develop graphical diagnostics that are informative about fit of
logistic regression model
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Model diagnostics
• Random binning
• Simplified Bayes Marginal Model Plots (SBMMP)
(Pardoe I, The American Statistician.2002, 56(4): 263-272)
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Random binning
• Generate a distribution of empirical probabilities of events
• Compare empirical probability with model predictions
( )
Dπ
D|y,binningπ f
versus ˆPlot
overlay
versus ~ Plot
( )binning|E,πf ~
( )π̂
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Simplified Bayes Marginal Model Plots
• Hypothesis: If the model describes data, then if we simulate ‘n’
observations, from posterior distribution of MODEL, SPLINE should
be one of those observations
• Splines are believed to be the best possible empirical fit to the data
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Simulation study
• Simulation
– Emax model (MATLAB)
• Estimation
– Emax model (WinBUGS)
– Linear model (WinBUGS)
• Evaluation (MATLAB)
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Simulation- Study design
0 10 200
50
100Number of individuals Design 1
0 10 200
100
200Design 2
0 10 200
200
400Design 3
0 10 200
1
Dose
Event
0 10 200
1
0 10 200
1
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Simulation parameters
Design 1 Design 2 Design 3
No.of simulations 30 30 30
No.of individuals 500 500 500
No.of dose levels 5 Random Random
Doses 0,1, 5, 10, 20 Random between 0
& 20
Random between 0
& 20
No.of individuals/dose
level
100 Random Random
No.of events 50%(approx) 50%(approx) 10%(approx)
ED50 5 5 5
Pr(E0) 0.2 0.2 0.05
Pr(Emax) 0.9 0.9 0.825
VarianceE0 0.025 0.025 0.025
VarianceEmax 0.025 0.025 0.025
VarianceED50 0.025 0.025 0.025
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Evaluation
1. Simple binning
– Based on dose
– Based on individuals
2. Random binning
– Based on dose
– Based on individuals
3. Simplified Bayes Marginal Model Plots (SBMMP)
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Random binning
• Number of bins = 5
• Minimum number of observations/bin=5
Step 1: Sort data by dose
Step 2: Generate 4 bin boundaries randomly based on dose or
individuals
Step 3: Group data based on bin boundaries generated above
Step 4: Estimate
Step 5: Repeat steps 2 - 4 1000 times
π~
Modelling and Simulation Lab, School of Pharmacy, University of Otago
SBMMP
• A linear spline was fitted to data with a maximum of 2 knots
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 1
Simple binning dose
0 10 200.1
0.7
Dose
Probability of event
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 1
Simple binning individuals
0 10 200.1
0.7
Dose
Probability of event
A
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 1
Random binning dose
0 10 200.1
0.7
Dose
Probability of event
AA
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 1
Random binning individuals
0 10 200.1
0.7
Dose
Probability of event
In case of Design 1 simple binning is a special case
of random binning
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 1
Model evaluation
0 10 200.1
0.7
A
0 10 200.1
0.7
B
Dose
Probability of event
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 2
May be correct model or may be not!!!
B C
0 10 200.1
0.7A
Simple binning
0 10 200.1
0.7B
Random binning
0 10 200.1
0.7C
SBMMP
Dose
Probability of event
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 2
May be not!!!
C
0 10 200.1
0.7A
Simple binning
0 10 200.1
0.7B
Random binning
0 10 200.1
0.7C
SBMMP
Dose
Probability of event
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 2
This is wrong model!!!
0 10 200.1
0.7A
Simple binning
0 10 200.1
0.7B
Random binning
0 10 200.1
0.7C
SBMMP
Dose
Probability of event
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 2
How about the correct model?
0 10 200.1
0.7A
Simple binning
0 10 200.1
0.7D
Probability of event
0 10 200.1
0.7B
Random binning
0 10 200.1
0.7E
0 10 200.1
0.7F
Dose
0 10 200.1
0.7C
SBMMP
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 3
Which binning method should I use??
0 10 200
0.3
A
Dose
Probability of event
Simple binning
0 10 200
0.3
B
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 3
Model describes data well!!!
0 10 200
0.3
A
Dose
Probability of event
Simple binning
0 10 200
0.3
B
Random binning
0 10 200
0.3
C
SBMMP
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 3
May be not!!!!
0 10 200
0.3
A
Dose
Probability of event
Simple binning
0 10 200
0.3
B
Random binning
0 10 200
0.3
C
SBMMP
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 3
This is wrong model!!!
0 10 200
0.3
A
Dose
Probability of event
Simple binning
0 10 200
0.3
B
Random binning
0 10 200
0.3
C
SBMMP
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Design 3
How about correct model?
0 10 200
0.3
AProbability of event
Simple binning
0 10 200
0.3
C
SBMMP
0 10 200
0.3
D
0 10 200
0.3
B
Random binning
0 10 200
0.3
E
0 10 200
0.3
F
Dose
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Discussion
• Simple binning
– Easy to do
– Single realisation of a set of possible empirical probabilities, hence
biased
– Data is discrete
• Random binning
– Random binning on average is unbiased, but adds noise
– Data is discrete
• SBMMP
– Additional model to be fitted to the data
– The spline which represents the data is continuous
• Both the Random binning and SBMMP are computationally intensive
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Conclusions
• Simple binning is a useful diagnostic for completely balanced
designs
• In case of unbalanced designs random binning acts as much better
diagnostic than simple binning
• SBMMP is the best diagnostics studied here
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Acknowledgements
• Prof. Stephen Duffull
• Dr. Geoff Isbister
• Friends from M&S lab, University of Otago, New Zealand
• School of Pharmacy, University of Otago, New Zealand
• University of Otago postgraduate scholarship
• PAGE-Pharsight sponsorship
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Thank you
Modelling and Simulation Lab, School of Pharmacy, University of Otago
Why 30 simulations?
• Assumption
• Number of simulations required for 90% chance of getting the best
and worst plot
-3 -2 -1 0 1 2 30
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
Averagegraphs
Bad graphsGood graphs