<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FAQ/infmles/likel</title><revhistory><revision><revnumber>13</revnumber><date>2013-03-08 10:17:44</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>12</revnumber><date>2011-04-20 11:11:01</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>11</revnumber><date>2011-04-20 11:07:37</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>10</revnumber><date>2011-04-20 11:07:00</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>9</revnumber><date>2011-04-20 11:06:18</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>8</revnumber><date>2011-04-20 11:05:58</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>7</revnumber><date>2011-04-20 11:01:36</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>6</revnumber><date>2011-04-20 11:00:53</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>5</revnumber><date>2011-04-20 10:59:41</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>4</revnumber><date>2011-04-20 10:58:42</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>3</revnumber><date>2011-04-20 10:54:31</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>2</revnumber><date>2011-04-20 10:49:11</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>1</revnumber><date>2011-04-20 09:34:40</date><authorinitials>PeterWatson</authorinitials></revision></revhistory></articleinfo><section><title>Using algebra to show why the maximum likelihood estimates are undefined when a response group only occurs in certain predictor groups</title><para>We consider a binary outcome (positive/negative) consisting of groups with $$n_text{1}$$ positives and $$n_text{2}$$ negatives and the probability of a positive outcome equal to p. Suppose we have a binary group predictor where we only get a positive outcome when x=0 and a negative outcome when x=1. This circumstance is known as <emphasis>complete separation</emphasis>. The log-likelihood may be written as </para><para>ln L = $$n_text{1}$$ ln p + $$n_text{2}$$ ln (1-p) </para><para>In a binary logistic regression </para><para>$$p = \frac{e<superscript>text{a+bx}}{1+ e</superscript>text{a+bx}}$$ where x is the group predictor taking values 0 and 1.  </para><para>ln L = $$n_text{1}$$(a+bx) - $$n_text{1}$$ ln(1 + $$e<superscript>text{a+bx}$$) + $$n_text{2}$$ - $$n_text{2}$$ ln(1+$$e</superscript>text{a+bx}$$) </para><para>$$\frac{d}{db} = n_text{1}x - n_text{1}x \frac{e<superscript>text{a+bx}}{1+e</superscript>text{a+bx}} - n_text{2}x \frac{e<superscript>text{a+bx}}{1+e</superscript>text{a+bx}}$$ </para><para>Since all the x=0 scores are in the 'positive' group (which we denote as group 1) and all the x=1 scores are in the 'negative' group (which we denote as group 2) we have </para><para>$$\frac{d}{db} = n_text{2}\frac{ e<superscript>text{a+b}}{1+e</superscript>text{a+b}}$$.  </para><para>$$\frac{d}{db}$$ =0 for maximum likelihood estimates and $$\frac{d}{db}$$ can only equal zero with infinite estimates of a and b hence the maximum likelihood estimates, a and b, are undefined. </para><para>This argument can be extended to continuous predictors where an outcome group only occurs for values below or above certain thresholds of the predictor.  </para><para>When the maximum likelihood estimates are undefined associated diagnostics such as -2 log likelihoods and R-squares may be outputted as 0 or 1. </para></section></article>