Linear Regression
OLS linear regression requires four key assumptions — linearity, normality of residuals, homoscedasticity, and independence. Licklider checks all four automatically, produces diagnostic plots, and enforces correlation-vs-causation disclosure for regression outputs.
STEP 1 — The Scenario
Researcher Profile
An epidemiologist studying the relationship between age (years) and serum CRP (C-reactive protein, mg/L) as a biomarker of systemic inflammation. The dataset is from a cross-sectional cohort study with n=120 participants.
Research Question
"Is serum CRP level associated with age in this cohort? What proportion of CRP variance is explained by age?"
Dataset
- n=120 participants (cross-sectional)
- Predictor: Age (years), continuous
- Outcome: Serum CRP (mg/L), continuous
- Covariates available: BMI, sex, smoking status (optional)
STEP 2 — Licklider Analysis Path
1. Data Upload & Profiling
Licklider detects two continuous variables (Age, CRP) and identifies additional categorical columns as potential covariates. No missing values in the primary variables; 4 missing BMI values are flagged.
2. Data Contract Declaration
Observation unit: one participant. Outcome type: continuous. Analysis purpose: exploratory (associations, not causal inference). Predictor declared as fixed continuous variable.
3. Assumption Checks (Pre-model)
Licklider runs:
- Linearity: Component-plus-residual (partial regression) plot
- Normality of residuals: Shapiro-Wilk on residuals; Q-Q plot
- Homoscedasticity: Breusch-Pagan test; residual vs. fitted plot
- Independence: Durbin-Watson test (for temporal autocorrelation if applicable)
4. Model Fitting
OLS linear regression: CRP ~ Age. β coefficient, standard error, t-value, p-value, and 95% CI for β are reported. R² and adjusted R² are calculated. If covariates are added, the model is re-fit and incremental R² is reported.
5. Influence Diagnostics
Licklider calculates Cook's Distance for each observation. Points with Cook's D > 4/n are flagged as potentially influential. The researcher can inspect these and decide whether to include or exclude them — any exclusion is logged in the Outlier Exclusion Log (1.1.2).
6. Figure Generation
A scatter plot with the fitted regression line and 95% confidence band is produced. The equation, R², and p-value are annotated. A set of diagnostic plots (residuals, Q-Q, scale-location, Cook's D) is available as a supplementary figure.
STEP 3 — Guards & Disclosures Activated
Correlation vs. Causation Notation (3.1.4)
Licklider detects that a regression line is fitted to observational cross-sectional data. The auto-generated figure legend and Methods text are required to use "associated with" rather than "causes" or "predicts" in a causal sense. The guard blocks "Age predicts CRP" and suggests "Age is associated with higher CRP levels."
Regression Diagnostics Guard (4.7.1)
All four assumption checks must pass before a regression result can be exported without a warning. If homoscedasticity fails, the guard recommends robust standard errors or log-transformation of the outcome, and discloses the diagnostic result in the report.
Missing Data Disclosure (4.1.7)
The 4 participants with missing BMI are flagged. If BMI is included as a covariate, the analysis is conducted on n=116 and this reduction is disclosed in the Methods text.
Covariate Selection Audit (4.6.3)
If covariates are added, Licklider requires the researcher to declare whether they are pre-specified or selected post-hoc. Post-hoc covariate selection is logged as exploratory and the report notes that inflated Type I error risk applies.
STEP 4 — Export Package
- Figure: Scatter plot with regression line + 95% CI band — 300 dpi TIFF/PDF
- Statistical Report: β (95% CI), SE, t, p-value; R², adjusted R²; model F-statistic; Cook's D summary; assumption check results
- Methods Text: "The association between age and serum CRP was assessed using OLS linear regression. Regression assumptions were verified (linearity, normality of residuals, homoscedasticity). β coefficients are presented with 95% CI. Results are described as associations; no causal inference is implied. n=120."
- Figure Legend: Equation, R², p-value, 95% CI band description, n
- Diagnostic Figures: Residual vs. fitted, Q-Q plot, scale-location, Cook's D
- Preprocessing Audit Log: Missing data summary; any influential point exclusions