Regression Analysis, Log Transformations, and Confounding in Epidemiological Data
- Regression analysis can be extended to model complex relationships between biological variables by incorporating data transformations.
- Two fundamental concepts in advanced linear regression include:
- Transforming non-normal or skewed data to satisfy statistical assumptions.
- Interpreting regression model coefficients when the dependent (outcome) variable has been transformed using a natural logarithm.
- Outcome log transformation introduces mathematical nuances where linear model parameters represent multiplicative and proportional changes rather than simple additive changes.
Biological Context and Dataset Overview
- Primary Variables under Investigation:
- Serum Testosterone Concentration: Testosterone is the principal male sex hormone, though it is present and functions in both males and females.
- Body Mass Index (BMI): A standard metric for assessing body composition and obesity.
- Biological Relationship:
- There is a well-established inverse relationship between serum testosterone concentrations and obesity.
- A primary physiological mechanism for this inverse relationship is that adipose tissue contributes to the metabolic conversion of testosterone into estradiol (a primary female sex hormone).
- The interaction between testosterone, obesity, and testosterone replacement therapy remains an active domain of medical research.
- Dataset Source:
- Data is derived from the US National Health and Nutrition Examination Survey (NHANES 2000).
- Analytical focus is placed on statistical modeling and interpretation rather than underlying biological mechanisms.
- Loading Dataset in iNZight:
- Navigate to
File -> Dataset Examples. - Select the dataset category
Future Learn. - Choose
NHANES 2000 (NHA NES 2000).
- Initial Visualization of Testosterone:
- Select
testosterone as the primary variable under the Visualize tab. - Distribution Shape: The raw continuous variable distribution is strongly right-skewed (asymmetric).
- Features of Right-Skewed Data: Most observations cluster at the lower concentration range, with a small tail of observations extending far toward high concentrations (outliers).
- Skewed continuous variables are extremely common in epidemiological data.
- Natural Logarithm Transformation:
- A standard transformation for right-skewed positive continuous data is the natural logarithm (log base e
or \n \ln(y)).
- Purpose of Transformation:
- Makes the variable distribution more symmetric.
- Brings the data closer to the normality assumptions required by linear regression models.
- Enhances model fit and simplifies modeling complex non-linear relationships rather than merely improving visual aesthetics.
- Post-Transformation Distribution Characteristics:
- Applying the natural log transformation to testosterone (ln(testosterone)) yields a substantially more symmetric distribution.
- Residual asymmetry or a bimodal distribution shape after log transformation points toward underlying subgroup heterogeneity (e.g., differences across sex or age brackets).
Subgroup Filtering and Multivariable Context
- Unrestricted Bivariate Analysis:
- Plotting log testosterone against BMI without filtering produces a scattered, noisy plot with an unclear overall association.
- Demographic Stratification:
- Age Effect: Testosterone levels are naturally lower in children relative to adults.
- Gender/Sex Effect: Testosterone concentrations are significantly lower in females compared to males.
- Data Filtering Steps in iNZight:
- Subset/filter the dataset to isolate males only.
- Restrict age range to adults, specifically focusing on ages 17 to 36 and above to eliminate pediatric confounding.
- Observed Relationship in Filtered Male Subgroup:
- The scatterplot demonstrates a clear negative association between BMI and log testosterone.
- As BMI increases, serum testosterone concentration tends to decrease systematically.
- Standard Linear Regression Formula:
\n y = \beta_0 + \beta_1 x\n
- In untransformed models, the slope coefficient β1 represents the absolute average change in y associated with a 1-unit increase in x.
- Log-Transformed Outcome Formula:
\n \ln(y) = \beta_0 + \beta_1 x\n
- When outcome y is log-transformed, β1 no longer represents an absolute change in y.
- Instead, β1 represents a relative or proportional change in y per 1-unit increase in x$.\n* **Mathematical Derivation of Proportional Change**:\n * Taking the exponential of both sides yields:\n
y = e^{\beta_0 + \beta_1 x} = e^{\beta_0} \cdot (e^{\beta_1})^x
\n * For a 1-unit increase in x,theexpectedoutcomeismultipliedbythefactore^{\beta_1}.\n * Using the Taylor series linear approximation e^x \approx 1 + xforsmallvaluesofx,aslopecoefficient\beta_1correspondstoapproximatelya\beta_1 \times 100\%changeintheexpectedvalueofy.\n\n# Statistical Inference and Coefficient Interpretation\n\n* **Model Parameter Values (Male Subgroup, Age 17+)**:\n * Outcome variable: \ln(\text{testosterone})\n * Predictor variable: \text{BMI}\n * Estimated slope coefficient (\beta_1estimate):-0.038\n* **Multiplicative Interpretation**:\n * The multiplicative factor is e^{-0.038} \approx 0.963.\n * For every 1-unit increase in BMI, the expected testosterone concentration is multiplied by approximately 0.963.\n* **Percentage Change Interpretation**:\n * Percentage change = (0.963 - 1) \times 100\% = -3.7\%\n * Approximated directly from the coefficient: -0.038 \rightarrow -3.8\%\n * **Definitive Interpretation Sentence**: For each 1-unit increase in BMI, the average serum testosterone concentration decreases by approximately 3.7\%(or3.8\% using direct linear approximation).\n* **P-Value and Hypothesis Testing**:\n * **Observed P-value**: Highly statistically significant (p < 0.05).\n * **Interpretation of P-value**: Provides strong statistical evidence against the null hypothesis \text{H}_0: \beta_1 = 0.\n * Under the model assumptions, there is strong evidence of a true association between BMI and testosterone concentration.\n * **Critical Distinction**: The p-value indicates the strength of evidence against the null hypothesis; it does **not** quantify the size, strength, or clinical relevance of the association. Clinical significance is judged by the magnitude of the regression coefficient \beta_1\n and its confidence interval.\n* **Intercept Interpretation**:\n * The estimated intercept \beta_0representstheexpectedvalueof\ln(\text{testosterone})when\text{BMI} = 0\n .\n * **Clinical Utility**: A BMI of 0 is biologically impossible. Thus, while \beta_0 is mathematically essential to construct the regression line, it carries no meaningful clinical interpretation.\n\n# Quantifying Relationships and Halving Calculations\n\n* **Calculating Required Change in Predictor for Specific Outcome Multipliers**:\n * To determine the change in continuous predictor \Delta xrequiredtomultiplytheoutcomebyaspecificfactork:\n
\Delta x = \frac{\ln(k)}{\beta_1}
\n* **Halving Calculation Scenario (k = 0.5)**:\n * To find the increase in BMI required to reduce average testosterone concentration by half (50\% reduction):\n
\Delta x = \frac{\ln(0.5)}{\beta_1} = \frac{-\ln(2)}{\beta_1}
\n * Given an adjusted model slope coefficient of \beta_1 = -0.035:\n
\Delta x = \frac{\ln(0.5)}{-0.035} = \frac{-0.69315}{-0.035} \approx 18.2\,\text{BMI units}
\n * **Result**: An increase of approximately 18.2\,\text{BMI units}isassociatedwitha\text{50\%} reduction (halving) in average testosterone concentration.\n * *Correction Note*: A slide error previously listed 19.8 \times 1.69^2;thetruecorrectedrequiredchangeis18.2\,\text{BMI units}.\n\n# Model Assessment Using Coefficient of Determination (R^2)\n\n* **Definition of R^2**:\n * The coefficient of determination (R^2) represents the proportion of total variation in the outcome variable that is explained by the linear regression model predictors.\n * **Formula**:\n
R^2 = 1 - \frac{\text{Unexplained Variation}}{\text{Total Variation}}
\n* **Comparing Model Fits**:\n * **Untransformed Outcome Model** (Raw Testosterone vs. BMI):\n * R^2 = 0.21(approximately21\% of variance explained).\n * **Log-Transformed Outcome Model** (\ln(\text{Testosterone}) vs. BMI):\n * Yields a higher R^2 value than the untransformed model.\n* **Guidelines for Model Selection**:\n * A higher R^2 value indicates a better fit to the empirical data.\n * R^2 must **not** be the sole metric for selecting a model; researchers must also verify that regression distributional assumptions (homoscedasticity, normality of residuals) are satisfied and that the model makes biological sense.\n\n# Confounding Analysis and Age Adjustment\n\n* **Age as a Potential Confounder**:\n * **Criterion for Confounding**: A variable must be associated with the exposure (BMI) and independently associated with the outcome (testosterone).\n * Biological basis: Age correlates positively with BMI (weight gain over time) and negatively with testosterone (age-related decline).\n* **Evaluating Confounding in iNZight**:\n * **Model Specification**:\n * Outcome: \ln(\text{testosterone})\n * Exposure: \text{BMI}\n * Potential Confounder: \text{Age}\n* **Standard Rule of Thumb for Confounding**:\n * If adding a potential confounder changes the exposure slope coefficient \beta_1by∗∗lessthan10\%**, the variable is **not** considered a substantial confounder.\n* **Numerical Comparison**:\n * Unadjusted BMI coefficient: -0.038\n * Adjusted BMI coefficient (controlling for age): -0.035\n * Relative change calculation:\n
\frac{|-0.038 - (-0.035)|}{|-0.038|} = \frac{0.003}{0.038} \approx 7.89\%
\n * Since 7.89\% < 10\%, adjusting for age produces very little change in the BMI coefficient.\n * **Conclusion**: Age does not act as a substantial confounder in the association between BMI and testosterone concentration within this analytical subgroup.\n\n# Questions and Course Administration\n\n* **Interpretation of Beta Coefficient P-value Question**:\n * *Question*: What is the best definition of the p-value associated with the slope \beta_1 coefficient?\n * *Answer*: The observed slope or a more extreme slope is unlikely under the assumption/belief that the true slope is zero.\n* **Software Troubleshooting and Data Entry**:\n * When running multivariable models in iNZight for confounding adjustments, assign y = \ln(\text{testosterone})$$ and enter both
BMI and age as explanatory variables to obtain the adjusted summary table.
- Tutorial Quizzes (Tutorials 3 and 4):
- Student query regarding unreleased quiz scores for weekly quizzes 3 and 4.
- Quiz grading is automated, but score visibility and release must be authorized by the course lead (Simon).