Overview
Correlation quantifies pairwise association. Regression estimates conditional relationships between a specified outcome and predictors. Survlytics supports Pearson and Spearman correlation, OLS linear regression and binary logistic regression.
Theoretical foundation
Pearson correlation standardises covariance; Spearman correlation applies Pearson correlation to ranks. OLS minimises squared residuals. Logistic regression estimates log odds through a binomial likelihood. Regression inference and out-of-sample prediction are different goals.
Key equations
\hat{\boldsymbol\beta}=(X^\top X)^{-1}X^\top y\log\frac{p}{1-p}=\beta_0+\sum_{j=1}^{p}\beta_jx_jAlgorithm and computation
Pearson and Spearman coefficients and two-sided p-values use SciPy. Pearson intervals use Fisher’s z transform; Spearman intervals are unavailable. Linear regression uses statsmodels OLS with conventional or HC3 covariance, R², adjusted R², F tests, VIF, Breusch–Pagan, residual and influence diagnostics. Logistic regression uses statsmodels Logit with odds ratios, likelihood-based fit, ROC and classification diagnostics. Designs are complete-case after dummy coding categorical predictors with the first observed category dropped.
Required data
Numeric pairs for correlation; a numeric continuous outcome for OLS; a binary outcome with a declared positive event for logistic regression; explicit predictors and controls.
Assumptions
Independent observations and a correctly specified functional form are central. Conventional OLS inference assumes homoskedastic errors; HC3 relaxes that covariance assumption but does not repair misspecification. Logistic models require an identifiable, non-separated design.
Available settings
Pearson or Spearman; listwise or pairwise correlation; conventional or HC3 covariance for OLS; intercept; categorical predictors; confidence level; classification threshold.
Worked example
Synthetic example: satisfaction is modelled from trust and tenure. The trust coefficient is interpreted conditionally on tenure, with its interval and diagnostics; it is not described as a causal effect.
Limitations and non-claims
Correlation does not imply causation. No penalised regression, mixed models, survey weights, time-series errors, imputation or automatic variable selection are implemented.
Validation notes
Regression and correlation outputs are covered by numerical unit tests using SciPy/statsmodels calculations. No cross-software frozen benchmark is claimed for every diagnostic.
How Surv.lytics computes Correlation
{'method': 'pearson', 'confidence': 0.95}How Surv.lytics computes Linear regression
{'cov_type': 'nonrobust', 'intercept': True}How Surv.lytics computes Logistic regression
{'threshold': 0.5, 'intercept': True}Was this article helpful?
Your response helps the methodology team improve this documentation.