Content deleted Content added
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0 |
Citation bot (talk | contribs) Removed URL that duplicated identifier. | Use this bot. Report bugs. | #UCB_CommandLine |
||
(12 intermediate revisions by 11 users not shown) | |||
Line 1:
{{Short description|Statistical technique}}
'''Conditional logistic regression''' is an extension of [[logistic regression]] that allows one to
==
Observational studies use [[stratification (clinical trials)|stratification]] or [[Matching (statistics)|matching]] as a way to control for [[confounding]].
[[Logistic regression]] can
:<math> \mathbb{P}(Y_{i\ell}=1|X_{i\ell})=\frac{\exp(\alpha_i + \boldsymbol\beta^\top X_{i\ell})}{1+\exp(\alpha_i + \boldsymbol\beta^\top X_{i\ell})}</math>
where <math>\alpha_i</math> is the constant term for the <math>i</math>th stratum. The parameters in this model can be estimated using [[maximum likelihood estimation]].
where <math>\alpha_i</math> is the constant term for the <math>i</math>th stratum. While this works satisfactorily for a limited number of strata, pathological behavior occurs when the strata are small. When the strata are pairs, the number of variables grows with the number of observations <math>N</math> (it equals <math>\frac{N}{2}+p</math>). The asymptotic results on which [[maximum likelihood estimation]] is based on are therefore not valid and the estimation is biased. In fact, it can be shown that the unconditional analysis of matched pair data results in an estimate of the odds ratio which is the square of the correct, conditional one.<ref>{{cite book |last1=Breslow |first1=N.E. |last2=Day |first2=N.E. |date=1980 |title=Statistical Methods in Cancer Research. Volume 1-The Analysis of Case-Control Studies |url=http://www.iarc.fr/en/publications/pdfs-online/stat/sp32/ |___location=Lyon, France |publisher=IARC |pages=249–251 |access-date=2016-11-04 |archive-url=https://web.archive.org/web/20161226114802/http://www.iarc.fr/en/publications/pdfs-online/stat/sp32/ |archive-date=2016-12-26 |url-status=dead }}</ref>▼
For example, consider estimating the impact of exercise on the risk of cardiovascular disease. If people who exercise more are younger, have better access to healthcare, or have other differences that improve their health, then a logistic regression of cardiovascular disease incidence on minutes spent exercising may overestimate the impact of exercise on health. To address this, we can group people based on demographic characteristics like age and zip code of their home residence. Each stratum <math>\ell</math> is a group of people with similar demographics. The vector <math>X_{i\ell}</math> contains information about the variable of interest (in this case, minutes spent exercising) for individual <math>i</math> in stratum <math>\ell</math>. The value <math>\alpha_i</math> is the impact of demographics on cardiovascular disease incidence <math>Y_{i\ell}</math>, which is assumed to be the same for all people in the stratum. The vector <math>\boldsymbol\beta</math> (which, in this example, is just a scalar) is the quantity of interest --- the impact of exercise on cardiovascular disease. We can also include control variables within <math>X_{i\ell}</math>.
==Motivation==
Logistic regression as described above works satisfactorily when the number of strata is small relative to the amount of data. If we hold the number of strata fixed and increase the amount of data, estimates of the model parameters (<math>\alpha_i</math> for each stratum and the vector <math>\boldsymbol\beta</math>) converge to their true values.
▲
In addition to tests based on logistic regression, several other tests existed before conditional logistic regression for matched data as shown in [[#Related tests|related tests]]. However, they did not allow for the analysis of continuous predictors with arbitrary stratum size. All of those procedures also lack the flexibility of conditional logistic regression and in particular the possibility to control for covariates.
==Conditional likelihood==
When the strata are pairs, where the first observation is a case and the second is a control, this can be seen as follows :<math>
\begin{align}
Line 30 ⟶ 42:
==Implementation==
Conditional logistic regression is available in R as the function <code>clogit</code> in the <code>survival</code> package. It is in the <code>survival</code> package because the log likelihood of a conditional logistic model is the same as the log likelihood of a Cox model with a particular data structure.<ref>{{cite web |url=https://stat.ethz.ch/R-manual/R-devel/library/survival/html/clogit.html |title=R documentation Conditional logistic regression |last1=Lumley |first1=Thomas
It is also available in python through the <code>statsmodels</code> package starting with version 0.14.<ref>{{cite web | url=https://www.statsmodels.org/dev/generated/statsmodels.discrete.conditional_models.ConditionalLogit.html |title=statsmodels.discrete.conditional_models.ConditionalLogit |access-date=March 25, 2023}}</ref>
==Related tests==
* A [[
* A [[Cochran-Mantel-Haenszel test]]
==Notes==
|