960 likes | 1.12k Views
What You See May Not Be What You Get: A Primer on Regression Artifacts. Michael A. Babyak, PhD Duke University Medical Center. Topics to Cover. Models: what and why? Preliminaries—requirements for a good model Dichotomizing a graded or continuous variable is dumb
E N D
What You See May Not Be What You Get: A Primer on Regression Artifacts Michael A. Babyak, PhD Duke University Medical Center
Topics to Cover • Models: what and why? • Preliminaries—requirements for a good model • Dichotomizing a graded or continuous variable is dumb • Using degrees of freedom wisely • Covariate selection • Transformations and smoothing techniques for non-linear effects • Resampling as a superior method of model validation
What is a model ? Y = f(x1, x2, x3…xn) Y = a + b1x1 + b2x2…bnxn Y = e a + b1x1 + b2x2…bnxn
Why Model? (instead of test) • Can capture theoretical/predictive system • Estimates of population parameters • Allows prediction as well as hypothesis testing • More information for replication
Preliminaries • Correct model • Measure well and don’t throw information away • Adequate Sample Size
Correct Model • Gaussian: General Linear Model • Multiple linear regression • Binary (or ordinal): Generalized Linear Model • Logistic Regression • Proportional Odds/Ordinal Logistic • Time to event: • Cox Regression • Distribution of predictors generally not important
Measure well and don’t throw information away • Reliable, interpretable • Use all the information about the variables of interest • Don’t create “clinical cutpoints” before modeling • Model with ALL the data first, then use prediction to make decisions about cutpoints
Implausible measurement assumption “not depressed” “depressed” A B C Depression score
Dichotomization, by definition, reduces power by a minimum of about 30% http://psych.colorado.edu/~mcclella/MedianSplit/
Dichotomization, by definition, reduces power by a minimum of about 30% Dear Project Officer, In order to facilitate analysis and interpretation, we have decided to throw away about 30% of our data. Even though this will waste about 3 or 4 hundred thousand dollars worth of subject recruitment and testing money, we are confident that you will understand. Sincerely, Dick O. Tomi, PhD Prof. Richard Obediah Tomi, PhD
Examples from the WCGS Study:Correlations with CHD Mortality (n = 750)
Dichotomizing does not reduce measurement error Gustafson, P. and Le, N.D. (2001). A comparison of continuous and discrete measurement error: is it wise to dichotomize imprecise covariates? Submitted. Available at http://www.stat.ubc.ca/people/gustaf.
Simulation: Dichotomizing makes matters worse when measure is unreliable b1 = .4 X1 Y True Model: X1 continuous
Simulation: Dichotomizing makes matters worse when measure is unreliable b1 = .4 X1 Y Same Model with X1 dichotomized
Simulation: Dichotomizing makes matters worse when measure is unreliable Reliability=.65, .75., .85, 1.00 b1 = .4 X1 Y Contin. b1 = .4 Dich. X1 Y Models with reliability of X1 manipulated
Dichotomization of a variable measured with error (y = .4x + e)
Dichotomization of a variable measured with error (y = .4x + e)
Simulation 2: Dichotomizing a continuous predictor that is correlated with another predictor X1 and X2 continuous b1 = .4 X1 Y X2 b2 = .0
Simulation 2: Dichotomizing a continuous predictor that is correlated with another predictor X1 dichotomized b1 = .4 X1 Y X2 b2 = .0
Simulation 2: Dichotomizing a continuous predictor that is correlated with another predictor X1 dichotomized; rho12 manipulated b1 = .4 X1 r12 = .0, .4, .7 Y X2 b2 = .0
Simulation 2: Dichotomizing a continuous predictor that is correlated with another predictor
Simulation 2: Dichotomizing a continuous predictor that is correlated with another predictor
Is it ever a good idea to categorize quantitatively measured variables? • Yes: • when the variable is truly categorical • for descriptive/presentational purposes • for hypothesis testing, if enough categories are made. • However, using many categories can lead to problems of multiple significance tests and still run the risk of misclassification
CONCLUSIONS • Cutting: • Doesn’t always make measurement sense • Almost always reduces power • Can fool you with too much power in some instances • Can completely miss important features of the underlying function • Modern computing/statistical packages can “handle” continuous variables • Want to make good clinical cutpoints? Model first, cut later.
Clinical Events and LVEF Change during Mental Stress: 5 Year follow-up Model first, cut later Prob{event} Maximum Change in LVEF (%)
Requirements: Sample Size • Linear regression • minimum of N = 50 + 8:predictor (Green, 1990) • Logistic Regression • Minimum of N = 10-15/predictor among smallest group (Peduzzi et al., 1990a) • Survival Analysis • Minimum of N = 10-15/predictor (Peduzzi et al., 1990b)
Concept of Simulation Y = b X + error bs1 bs2 bsk-1 bsk bs3 bs4 ………………….
Concept of Simulation Y = b X + error bs1 bs2 bsk-1 bsk bs3 bs4 …………………. Evaluate
Simulation Example Y = .4 X + error bs1 bs2 bsk-1 bsk bs3 bs4 ………………….
Simulation Example Y = .4 X + error bs1 bs2 bsk-1 bsk bs3 bs4 …………………. Evaluate
Sample Size • Linear regression • minimum of N = 50 + 8:predictor (Green, 1990) • Logistic Regression • Minimum of N = 10-15/predictor among smallest group (Peduzzi et al., 1990a) • Survival Analysis • Minimum of N = 10-15/predictor (Peduzzi et al., 1990b)
Simulation: number of events/predictor ratio Y = .5*x1 + 0*x2 + .2*x3 + 0*x4 -- Where r x1 x4 = .4 -- N/p = 3, 5, 10, 20, 50
Peduzzi’s Simulation: number of events/predictor ratio P(survival) =a + b1*NYHA + b2*CHF + b3*VES +b4*DM + b5*STD + b6*HTN + b7*LVC --Events/p = 2, 5, 10, 15, 20, 25 --% relative bias = (estimated b – true b/true b)*100
Predictor (covariate) selection • Theory, substantive knowledge, prior models • Testing for confounding • Univariate testing • Last (and least), automated methods, aka stepwise and best subset regression
Searching for Confounders • Fundamental tension between underfitting and overfitting • Underfitting = not adjusting for important confounders • Overfitting = capitalizing on chance relations (sample fluctuation)
Covariate selection • Overfitting has been studied extensively • “Scariest” study is by Faraway (1992)—showed that any pre-modeling strategy cost a df over and above df used later in modeling. • Premodeling strategies included: variable selection, outlier detection, linearity tests, residual analysis.
Covariate selection • Therefore, if you transform, select, etc., you must include the DF in (i.e., penalize for) the “Final Model”
Covariate selection: Univariate Testing • Non-Significant tests also cost a DF • Variables may not behave the same way in a multivariable model—variable “not significant” at univariate test may be very important in the presence of other variables
Covariate selection • Despite the convention, testing for confounding has not been systematically studied—likely leads to overadjustment and underestimate of true effect of variable of interest. • At the very least, pulling variables in and out of models inflates the Type I error rate, sometimes dramatically
SOME of the problems with stepwise variable selection. 1. It yields R-squared values that are badly biased high
SOME of the problems with stepwise variable selection. 1. It yields R-squared values that are badly biased high 2. The F and chi-squared tests quoted next to each variable on the printout do not have the claimed distribution