Logistic regression

Last updated: November 01, 2022

Logistic regression

Watch later

Watch later

Nervous system anatomy and physiology
Sympathetic nervous system
Parasympathetic nervous system
Central nervous system histology
Peripheral nervous system histology
Cardiac muscle histology
Respiratory system anatomy and physiology
Introduction to the immune system
Innate immune system
Seizures and epilepsy
Migraine
Alzheimer disease
Vascular dementia
Frontotemporal dementia
Dementia with Lewy bodies
Kluver-Bucy syndrome
Multiple sclerosis
Neurogenic bladder
Brown-Sequard Syndrome
Parkinson disease
Acoustic neuroma (schwannoma)
Spinal muscular atrophy
Myasthenia gravis
Sciatica
Carpal tunnel syndrome
Horner syndrome
Pediatric brain tumors
Eustachian tube dysfunction
Cardiovascular system anatomy and physiology
Glaucoma
Anatomy and physiology of the ear
Anatomy and physiology of the eye
Adrenergic receptors
Cholinergic receptors
Pyramidal and extrapyramidal tracts
Basal ganglia: Direct and indirect pathway of movement
Muscle spindles and golgi tendon organs
Cerebellum
Somatosensory receptors
Optic pathways and visual fields
Vestibular transduction
Olfactory transduction and pathways
Somatosensory pathways
Photoreception
Auditory transduction and pathways
Vestibulo-ocular reflex and nystagmus
Taste and the tongue
Cranial nerves
Body temperature regulation (thermoregulation)
Breathing cycle and regulation
Action potentials in myocytes
Action potentials in pacemaker cells
Cardiac excitation-contraction coupling
Excitability and refractory periods
Cardiac conduction system
Cardiac conduction velocity
ECG basics
ECG intervals
ECG axis
ECG rate and rhythm
ECG QRS transition
ECG normal sinus rhythm
ECG cardiac hypertrophy and enlargement
ECG cardiac infarction and ischemia
Adrenocorticotropic hormone
Oxytocin and prolactin
Growth hormone and somatostatin
Antidiuretic hormone
Insulin
Glucagon
Testosterone
Estrogen and progesterone
Gastrointestinal system anatomy and physiology
Anatomy and physiology of the teeth
Liver anatomy and physiology
Enteric nervous system
Gastric motility
Esophageal motility
Chewing and swallowing
Fats and lipids
Carbohydrates and sugars
Proteins
Pancreatic secretion
Prebiotics and probiotics
Bile secretion and enterohepatic circulation
Blood components
Blood groups and transfusions
Platelet plug formation (primary hemostasis)
Role of Vitamin K in coagulation
Coagulation (secondary hemostasis)
Clot retraction and fibrinolysis
Cytokines
Complement system
T-cell development
MHC class I and MHC class II molecules
T-cell activation
B-cell development
B-cell activation, differentiation, and contraction
Cell-mediated immunity of CD4 cells
Cell-mediated immunity of natural killer and CD8 cells
Somatic hypermutation and affinity maturation
Antibody classes
VDJ rearrangement
Contracting the immune response and peripheral tolerance
B- and T-cell memory
Skin anatomy and physiology
Wound healing
Hair, skin and nails
Skeletal system anatomy and physiology
Cartilage structure and growth
Bone remodeling and repair
Fibrous, cartilage, and synovial joints
Muscular system anatomy and physiology
Neuromuscular junction and motor unit
Slow twitch and fast twitch muscle fibers
Muscle contraction
Sliding filament model of muscle contraction
Brachial plexus
Neuron action potential
Cerebral circulation
Ascending and descending spinal tracts
Renal system anatomy and physiology
Hydration
Movement of water between body compartments
Body fluid compartments
Renal clearance
Regulation of renal blood flow
Glomerular filtration
Measuring renal plasma flow and renal blood flow
Tubular reabsorption of glucose
Tubular secretion of PAH
Urea recycling
Proximal convoluted tubule
Distal convoluted tubule
Loop of Henle
Renin-angiotensin-aldosterone system
Sodium homeostasis
Phosphate, calcium and magnesium homeostasis
Potassium homeostasis
Osmoregulation
Kidney countercurrent multiplication
Erythropoietin
Physiologic pH and buffers
The role of the kidney in acid-base balance
Buffering and Henderson-Hasselbalch equation
Acid-base map and compensatory mechanisms
Respiratory acidosis
Plasma anion gap
Metabolic acidosis
Respiratory alkalosis
Metabolic alkalosis
Anatomy and physiology of the male reproductive system
Puberty and Tanner staging
Anatomy and physiology of the female reproductive system
Menopause
Pregnancy
Stages of labor
Breastfeeding
Lung volumes and capacities
Anatomic and physiologic dead space
Alveolar surface tension and surfactant
Ventilation
Regulation of pulmonary blood flow
Ventilation-perfusion ratios and V/Q mismatch
Pulmonary shunts
Zones of pulmonary blood flow
Diffusion-limited and perfusion-limited gas exchange
Airflow, pressure, and resistance
Gas exchange in the lungs, blood and tissues
Alveolar gas equation
Oxygen binding capacity and oxygen content
Oxygen-hemoglobin dissociation curve
Carbon dioxide transport in blood
Muscle weakness: Clinical
Bone histology
Skeletal muscle histology
Cartilage histology
Gout and pseudogout: Pathology review
Glucocorticoids
Non-steroidal anti-inflammatory drugs
Opioid agonists, mixed agonist-antagonists and partial agonists
Antigout medications
Prostate gland histology
Penis histology
Testis, ductus deferens, and seminal vesicle histology
Mammary gland histology
Fallopian tube and uterus histology
Cervix and vagina histology
Ovary histology
Menstrual cycle
Prostate cancer
Benign prostatic hyperplasia
Erectile dysfunction
Amenorrhea
Androgens and antiandrogens
Adrenergic antagonists: Alpha blockers
PDE5 inhibitors
Estrogens and antiestrogens
Progestins and antiprogestins
Aromatase inhibitors
Uterine stimulants and relaxants
Thyroid and parathyroid gland histology
Adrenal gland histology
Pituitary gland histology
Pancreas histology
Hyperthyroidism medications
Hypothyroidism medications
Insulins
Miscellaneous hypoglycemics
Hypoglycemics: Insulin secretagogues
Adrenal hormone synthesis inhibitors
Mineralocorticoids and mineralocorticoid antagonists
Blood histology
Spleen histology
Lymph node histology
Thymus histology
Skin histology
Ureter, bladder and urethra histology
Kidney histology
Nasal cavity and larynx histology
Bronchioles and alveoli histology
Trachea and bronchi histology
Introduction to biostatistics
Probability
Types of data
Mean, median, and mode
Standard error of the mean (Central limit theorem)
Range, variance, and standard deviation
Normal distribution and z-scores
Paired t-test
Hypothesis testing: One-tailed and two-tailed tests
Two-way ANOVA
Correlation
Linear regression
Two-sample t-test
One-way ANOVA
Repeated measures ANOVA
Methods of regression analysis
Logistic regression
Type I and type II errors
Sensitivity and specificity
Test precision and accuracy
Positive and negative predictive value
Incidence and prevalence
Odds ratio
Mortality rates and case-fatality
Direct standardization
Relative and absolute risk
DALY and QALY
Indirect standardization
Study designs
Ecologic study
Case-control study
Clinical trials
Cross sectional study
Cohort study
Sample size
Disease causality
Information bias
Interaction
Selection bias
Confounding
Prevention
Control of blood flow circulation
Cardiac and vascular function curves
Altering cardiac and vascular function curves
Baroreceptors
Laminar flow and Reynolds number
Resistance to blood flow
Pressures in the cardiovascular system
Blood pressure, blood flow, and resistance
Compliance of blood vessels
Microcirculation and Starling forces
Measuring cardiac output (Fick principle)
Cardiac contractility
Cardiac preload
Law of Laplace
Stroke volume, ejection fraction, and cardiac output
Frank-Starling relationship
Cardiac afterload
Cardiac cycle
Pressure-volume loops
Physiological changes during exercise
Cardiac work
Changes in pressure-volume loops
Chemoreceptors
Endocrine system anatomy and physiology
Synthesis of adrenocortical hormones
Cortisol
Vitamin D
Adrenal insufficiency: Pathology review
Adrenal masses: Pathology review
Hyperthyroidism: Pathology review
Hypothyroidism: Pathology review
Thyroid nodules and thyroid cancer: Pathology review
Parathyroid disorders and calcium imbalance: Pathology review
Diabetes mellitus: Pathology review
Cushing syndrome and Cushing disease: Pathology review
Pituitary tumors: Pathology review
Hypopituitarism: Pathology review
Diabetes insipidus and SIADH: Pathology review
Multiple endocrine neoplasia: Pathology review
Congenital gastrointestinal disorders: Pathology review
Esophageal disorders: Pathology review
GERD, peptic ulcers, gastritis, and stomach cancer: Pathology review
Inflammatory bowel disease: Pathology review
Malabsorption syndromes: Pathology review
Diverticular disease: Pathology review
Appendicitis: Pathology review
Gastrointestinal bleeding: Pathology review
Colorectal polyps and cancer: Pathology review
Pancreatitis: Pathology review
Jaundice: Pathology review
Viral hepatitis: Pathology review
Cirrhosis: Pathology review
Microcytic anemia: Pathology review
Non-hemolytic normocytic anemia: Pathology review
Intrinsic hemolytic normocytic anemia: Pathology review
Extrinsic hemolytic normocytic anemia: Pathology review
Macrocytic anemia: Pathology review
Coagulation disorders: Pathology review
Platelet disorders: Pathology review
Mixed platelet and coagulation disorders: Pathology review
Thrombosis syndromes (hypercoagulability): Pathology review
Lymphomas: Pathology review
Leukemias: Pathology review
Plasma cell disorders: Pathology review
Myeloproliferative disorders: Pathology review
Immunodeficiencies: Combined T-cell and B-cell disorders: Pathology review
Immunodeficiencies: Phagocyte and complement dysfunction: Pathology review
Pigmentation skin disorders: Pathology review
Acneiform skin disorders: Pathology review
Papulosquamous and inflammatory skin disorders: Pathology review
Vesiculobullous and desquamating skin disorders: Pathology review
Skin cancer: Pathology review
Back pain: Pathology review
Rheumatoid arthritis and osteoarthritis: Pathology review
Seronegative and septic arthritis: Pathology review
Systemic lupus erythematosus (SLE): Pathology review
Scleroderma: Pathology review
Sjogren syndrome: Pathology review
Bone disorders: Pathology review
Bone tumors: Pathology review
Myalgias and myositis: Pathology review
Neuromuscular junction disorders: Pathology review
Muscular dystrophies and mitochondrial myopathies: Pathology review
Vitamin B12 deficiency
Friedreich ataxia
Syringomyelia
Charcot-Marie-Tooth disease
Guillain-Barre syndrome
Lambert-Eaton myasthenic syndrome
Congenital neurological disorders: Pathology review
Headaches: Pathology review
Seizures: Pathology review
Cerebral vascular disease: Pathology review
Traumatic brain injury: Pathology review
Spinal cord disorders: Pathology review
Dementia: Pathology review
Central nervous system infections: Pathology review
Movement disorders: Pathology review
Demyelinating disorders: Pathology review
Adult brain tumors: Pathology review
Pediatric brain tumors: Pathology review
Neurocutaneous disorders: Pathology review

Transcript

Watch video only

Content Reviewers

Logistic regression is a type of statistical method that’s used to describe the relationship between an outcome variable and one or more exposure variables.

In logistic regression, the outcome variable is always categorical, and the exposure variables can be either categorical or quantitative.

For example, let’s say you want to figure out if smoking more cigarettes increases the chance of having a heart attack. In this case, the number of cigarettes is a quantitative exposure and whether or not a person has a heart attack is a categorical outcome.

Now, to figure this out, you might ask 200 people how many cigarettes they smoke in a day, and then follow that group of people for five years and see who has a heart attack and who doesn’t.

You could organize your data in a table like this—where the first column, or variable, is the number of cigarettes a person smokes, the second column is if they had a heart attack or not, and the rest of the columns are other characteristics, or variables, that you collected about each person, like their age, sex, and body mass index, or BMI.

Usually, for binary variables, like yes or no, we use the numbers zero and 1 to represent the two possible answers.

So, for the heart attack variable, we might say that zero represents “no” and 1 represents “yes”. We could do the same thing for sex, where zero represents females and 1 represents males.

Now, let’s just look at the first two variables, so how many cigarettes they smoke and if they had a heart attack or not. You could plot these measurements, or data points, on a scatterplot, with the number of cigarettes on the x-axis, and heart attack on the y-axis, and where each data point represents one individual.

This scatterplot might seem a little funny looking, and that’s because all of the data points are clustered on two points on the y-axis—they’re either on the zero, which represents no, or the 1, which represents yes.

This scatterplot can help us figure out how the odds of having a heart attack changes for people as they smoke more and more cigarettes.

And that’s the goal of logistic regression.

Now, in statistics, probability and odds are often confused with one another, so let’s break down the difference.

The probability is the number of times an outcome happened divided by the number of times the outcome could have happened, and it’s often represented by a capital P.

So, using our data, we could figure out the probability of having a heart attack for each number of cigarettes smoked per day.

Let’s say the range for the number of cigarettes smoked is between zero and 19, so we can break up the scatterplot up into 20 different sections - and it’s 20 sections instead of just 19 because zero is also a section.

Now, to find the probability of having a heart attack in a specific section, we count up the number of people who had heart attacks in that section and divide it by the total number of people in that section.

As an example, let’s say there are 10 people in the 15-cigarette section - or in other words, there are 10 people in the study that smoke 15 cigarettes per day - and of those 10 people, 6 people had heart attacks. So, the probability of having a heart attack for people that smoke 15 cigarettes per day is 6 over 10, or 60%.

Now let’s switch gears and talk about odds. Odds compare the probability of an outcome occurring with the probability of an outcome not occurring, so the equation for odds is P divided by 1 minus P.

So, in our example, we’d use the probability of having a heart attack - which is 60%, or 0.6 - compared with the probability of not having a heart attack, which is 1 minus 0.6, or 0.4. If we divide both sides by 0.4 we get 1.5 compared to 1.

To make it easier to interpret, let’s multiply both sides by two, so we get a 3 to 2 ratio. In other words, out of all the people that smoke 15 cigarettes per day, there are 3 people that have heart attacks for every 2 people that don’t have heart attacks.

Okay, coming back to the scatterplot... typically, in linear regression, a linear trend line is drawn to represent the pattern of data points on the plot, and that line is represented by the equation: y-hat equals b0 plus b1x1, where y-hat is the estimated value for the outcome variable; x1 is the value of the exposure variable; b0 represents the y-intercept; and b1 represents the slope of the line.

But in logistic regression, the trend line looks a bit different. That’s because the data points for logistic regression aren’t arranged in a straight line, so a linear trend line isn’t a good fit, or representation, of the data.

Instead, the trend line for logistic regression is curved, and specifically, it’s an S-shaped curve. And the equation for this S-shaped curve is P equals e, raised to the power of b0 plus b1x1, divided by 1 plus e, raised to the power of b0 plus b1x1.

At this point, you might be wondering what trend lines have to do with probability and odds.

Well, the slope of a line at a specific point represents a certain probability - so a data point on a very steep slope represents a high probability and a data point on a very shallow slope represents a low probability.

So with an S-shaped curve, the probability of an occurrence - which in this case, is the probability of having a heart attack - is different at various points along the line, which makes it pretty hard to interpret.

For example, toward the bottom of the line, the probability is low, then toward the middle of the line, the probability is higher, and then at the top of the line, the probability is low again.

And this is a problem because typically, we want to draw a line that represents the whole sample population, so that we can make conclusions about the whole sample population.

To fix this problem, we have to transform, or change, our data points so that they’re arranged on the plot in a more linear pattern. To do this, we have to change our data from looking at probability to looking at odds, and we actually have to go one step further and change them to the logarithm of odds, or the log-odds.

So, if the basic equation for odds is P over 1 minus P, then to change our probability equation to an odds equation, we do P over 1 minus P equals - e, raised to the power of b0 plus b1x1 - over - 1 minus e, raised to the power of b0 plus b1x1.

If you simplify this equation - which we won’t show here, just for simplicity’s sake - what you end up with is P over 1 minus P equals e, raised to the power of b0 plus b1x1. Okay, so that’s the odds equation.

And to change the odds equation to the log-odds, we just take the log of both sides. So, we end up with log of P over 1 minus P equals b0 plus b1x1.

This equation, as you might recognize, is the equation for a linear trend line. And, in fact, if we look at the newly transformed data, we’ll see that it’s now linearly arranged on the plot.

Whew! Sometimes the math can seem a little confusing, but luckily, statistical software does most of that work for us!

Basically, the software spits out values for b0 and b1, which we can then plug into our equation. For example, let’s say the software gives us a b0 of 0.05 and a b1 of 0.2, so the equation for the line would be y-hat equals 0.05 plus 0.2 times x1.

Key Takeaways

Logistic regression is a statistical method used to describe the relationship between an outcome variable and one or more exposure variables. Logistic regression can help to figure out the effect of an exposure variable (e.g. the number of cigarettes per day) on a categorical outcome variable (e.g. Having a heart attack). Note that the outcome variable is always categorical, but the exposure variables can be either categorical or quantitative.