6
$\begingroup$

I'm conducting a logistic regression in R using glm. My outcome is race (White = 0, Black = 1). The data are below:

 race whiteHom blackHom hispHom
white     64.6      2.7    22.1
white     19.7     47.8    20.3
white     18.9     26.3    43.0
white     63.2     31.6     5.3
white     77.4      6.5    12.9
black     21.4     76.7     0.9
white     52.5     30.1    14.2
black     45.0     24.3    27.2
black      4.7     91.7     1.9
white     70.0      5.0     8.8
black     34.7     65.3     0.0
white     51.3      4.8    35.3
white     71.7      5.0    20.0
white     72.7     25.0     2.3
white    100.0      0.0     0.0
white     24.1      7.8    59.0
white     22.0      4.0    72.0
black     29.4     47.9     7.7
white     93.8      4.2     2.1
white     51.3      4.8    35.3
white     45.0     24.3    27.2
white     38.6     29.2    21.0
white     25.3     59.3     6.6
black     23.9     67.9     7.3
white     32.3     54.8     0.0
black     28.3     68.1     2.1
black     31.6     13.0    49.8
black     36.7     35.0    23.2
white     49.4     29.9    18.2
black     35.5     42.1     2.6
white     38.4      7.8    31.6
white    100.0      0.0     0.0
white     58.1     31.6     6.0
black      8.6     89.9     0.8
white     28.4     18.4    50.2
white     93.3      0.0     4.4
white     35.6     51.0    13.4
black     30.5     55.4    11.5
white     32.9     21.2    44.0
black      4.9     92.9     1.6
white     80.0      0.0    20.0
white     25.3     59.3     6.6
white     66.7      0.0    16.7
black     29.5     64.1     5.0
white     24.9     37.1    27.1
white     92.9      0.0     7.1
white     38.1     34.2    24.5
white     83.3     10.0     0.0
white     29.2     58.7    10.5
white     70.0      5.0     8.8
black     25.7     69.4     2.6
white     22.1     30.6    44.1
white     20.9     70.3     7.5
white     70.8     29.2     0.0
black      8.6     89.9     0.8
black     18.8     51.8    23.6
black     10.8     61.9    19.6
white     21.7     54.3    23.9
black     10.5     83.8     4.9
black     39.2     37.3    22.5
white     22.1     30.6    44.1
black     28.3     66.1     4.4
white     28.4     18.4    50.2
black     37.4     43.3    14.0
white     36.7     45.9    14.3
black     58.6     32.5     5.3
white     32.9     21.2    44.0
white     22.2     54.8    20.7
white     92.9      0.0     7.1
white     58.3     20.4    17.6
white     62.5      4.2    33.3
black     10.5     83.8     4.9
white     94.7      0.0     5.3
black     25.8      7.9    48.6
white     39.6     58.3     2.1
white     22.1     30.6    44.1
white     68.2     31.8     0.0
white     35.3     24.4    39.9
white     25.7     69.4     2.6
white      3.6      0.9    95.0
white     80.0      1.2    16.2
black      7.0     57.7    33.2
white     79.2      7.5     7.5
white    100.0      0.0     0.0
white     76.3     13.2     7.9
white     83.0      4.0     9.0
white     33.1     10.4    47.8
white     59.1     17.3    15.4
white     36.7     50.0     3.3
white     58.6     32.5     5.3
white     78.4     19.0     1.3
black     17.0     66.3    14.7
black     15.2     81.0     3.3
white     50.0      0.0    44.4
white     23.9     67.9     7.3
white     54.2     37.3     6.4
black     52.9     47.1     0.0
white     30.0     53.0    14.6
white     34.9     29.2    32.5
white     77.8     20.2     1.0
white     62.9     11.4     7.1
white     29.2     58.7    10.5
white     75.3     23.4     1.3
black     37.4     43.3    14.0
white     34.9     31.5    27.9
white     15.9     58.0    23.2
white     47.8     46.2     2.4
white     46.6     41.5     9.8
black     47.0     45.5     4.5
white     39.1      0.0     8.7
black      8.9     89.1     2.0
white     36.7     50.0     3.3
black     19.4     79.1     0.7
black     10.9     33.8    50.8
white     81.2     12.5     6.2
black     27.3     51.8    19.3
black     24.7     72.9     1.2
white     31.6     13.0    49.8
white     59.2     29.3    10.9
black     16.3     72.7     8.7
black     50.4     36.5     9.6
black     36.7     35.0    23.2
black     48.1     38.3    12.3
white     31.6     13.0    49.8
white     21.0     68.1     8.8
black     27.6      5.0    55.6
black     54.2     37.3     6.4
white     33.3      0.0    66.7
white     93.8      6.2     0.0
white     19.1     75.9     2.9
white     15.2     81.0     3.3
black     18.9     77.0     3.2
white     80.4      1.1    13.8
black     80.3     14.8     3.3
white     68.7     28.3     3.0
black      3.2     92.7     3.0
white     22.1     30.6    44.1
white     80.0     20.0     0.0
white     72.9     15.7    11.4
white     27.1     71.4     1.4
white     29.4     47.9     7.7
white     58.6     32.5     5.3
white     64.6     22.9     8.3
white     23.5     66.7     9.8
white     19.7     47.8    20.3
white     25.0     21.7    50.1
white     77.2      6.3    11.4
white     55.6      0.0    39.5
white     31.6     13.0    49.8
white     28.3     66.1     4.4
black     25.3     66.4     4.0
black     18.9     77.0     3.2
white     25.0     21.7    50.1
white     75.8     24.2     0.0
white     90.0      0.0     0.0
white     29.5     64.1     5.0
black     22.4     71.5     4.4
white     73.4      1.6    17.7
white     25.6     48.2    19.7
white     94.1      5.9     0.0
white    100.0      0.0     0.0
black     47.4     29.0    21.0
black     25.8      7.9    48.6
white     49.6     27.7    14.2
black     30.0     53.0    14.6
black     15.0     83.6     0.9
white     90.0     10.0     0.0
white     25.8      7.9    48.6
white     31.6     13.0    49.8
black     27.5     69.1     0.0
white     60.1     23.0    12.2
black     24.9      6.1    66.8
black     30.2     56.4    10.7
white     51.7     14.2    29.4
black     11.3     64.2    21.6
white     81.8     18.2     0.0
white     32.2     21.8    37.3
black     15.2     81.0     3.3
white     92.9      7.1     0.0
black     72.5     23.5     2.0
white     34.9     31.5    27.9
white     86.1      2.5     9.5
white     12.3     71.0    14.1
black     10.9     33.8    50.8
white     40.4     58.5     0.5
black     39.4     45.1    14.1
black     37.0     45.3    11.2
white     85.7     14.3     0.0
white     92.9      7.1     0.0
white     31.6     13.0    49.8
black     38.2     39.6    19.6
black     27.6      5.0    55.6
white     24.5      0.0    71.8
black     18.6     75.8     4.7
white     23.9     67.9     7.3
black     22.4     71.5     4.4
white     25.0     21.7    50.1
white     68.5      7.4     3.7
white     25.8      7.9    48.6
black     18.7     75.8     2.2
white     75.0     13.5     3.8
white     18.4     17.9    62.2
white     85.7      7.9     4.8
white     47.9     47.6     3.5
white     76.2      9.5    14.3
white     44.2     41.7    11.2
white     26.8     46.4    24.7
black     23.9     67.9     7.3
white     65.2     16.3    10.9
white     50.0     42.9     7.1
black      7.0     57.7    33.2
black     20.9     38.6    35.8
black     47.9     47.6     3.5
white     88.6      5.7     5.7
black      8.6     70.1    17.7
black     19.4     79.1     0.7
white     31.6     13.0    49.8
white     70.7     26.1     1.9
white     73.7     15.8    10.5
white     75.0      0.0    25.0
black     20.9     57.0    20.9
white     60.1     28.8     6.7
black     15.0     83.6     0.9
white     18.0     46.6    24.3
white     10.9     33.8    50.8
white     50.0      3.5    39.0
white     52.7     20.0     3.6
black     61.1      0.0    38.9
white     55.7      3.6    38.6
black     27.4     36.1    28.6
white     19.2      9.0    71.8
white     54.7     31.7    11.2
white     58.8      0.0    17.6
white     40.6      3.1     3.1
white     27.6      5.0    55.6
white     34.3     13.1    52.5
black      4.7     91.7     1.9
white     74.3     22.9     0.0
white     65.1     33.3     0.0
white     85.7      8.6     2.9
black      8.1     84.6     6.2
white     32.2     21.8    37.3
white     24.4     64.3     8.7
black     25.0     62.5     0.0
white     49.5     47.4     3.2
black     18.8     46.9    31.1
white     85.7      0.0    14.3
white     24.1      7.8    59.0
white     74.2      1.5    22.7
white    100.0      0.0     0.0
white    100.0      0.0     0.0
black     10.9     33.8    50.8
white     25.5     57.1    14.0
black     10.9     33.8    50.8
white     30.0     49.2    17.5
white     24.9     39.7    26.2
black     62.3     20.8    13.0
white     38.4      7.8    31.6
black     22.4     71.5     4.4
white     94.1      2.9     2.9
black      6.5     82.7     9.2
white     78.0     15.9     3.7
black     38.1     34.2    24.5
white     54.4     25.6     9.0
black     25.3     66.4     4.0
white     27.6      5.0    55.6
white     42.4     43.9     9.1
white     33.8     53.1    12.1
white     30.5     33.4    23.4
white     51.6     40.4     5.0
white     32.2     21.8    37.3
white     50.0      0.0    44.4
black      8.6     70.1    17.7
white     34.4     42.1    21.1
black      7.6     81.5     7.9
black     87.5      0.0    12.5
white     47.0     45.5     4.5
white    100.0      0.0     0.0
black     38.1     34.2    24.5
black     29.5     64.1     5.0
white     78.0     15.9     3.7
black     54.4     23.9    20.6
white     75.0      1.4    22.2
white     72.7     25.0     2.3
white     41.0     57.6     0.7
black     29.2     58.7    10.5
white     18.6     75.8     4.7
white     90.9      0.0     9.1
black     93.9      6.1     0.0
black     18.6     75.8     4.7
black     30.5     55.4    11.5
white     96.3      0.0     3.7
white     76.9      0.0    23.1
black      9.7     86.3     3.6
white     11.1      0.0     2.6
white     32.9     21.2    44.0
black     13.2     65.6    16.7
black     40.8     53.8     4.7
white     51.9     29.1    14.2
white     37.4     43.3    14.0
white     32.2     21.8    37.3
white     53.8     38.5     7.7
black     36.4     11.4    46.8
white     32.6     61.8     3.4
black     46.6     41.1    12.3
white      9.7     86.3     3.6
black     57.1     15.4    15.7
white     50.0     21.1     5.3
white     95.7      0.0     2.1
white     73.4      1.6    17.7
white     58.5     30.2    11.3
white     22.0     65.5    11.0
white     77.2      6.3    11.4
black     11.3     64.2    21.6
white     88.5      3.8     7.7
black     10.8     61.9    19.6
white     36.8     30.3    31.6
white     92.9      7.1     0.0
white     59.3     28.9     9.8
white     37.0     45.3    11.2
white     84.4      4.4     8.9
white     54.2     37.3     6.4
white     23.9     67.9     7.3
white     82.4     11.8     5.9
white     31.6     13.0    49.8
black     18.8     46.9    31.1
white     52.5     30.1    14.2
white     20.9     38.6    35.8
black     19.7     77.7     1.8
black      8.2     51.5    37.7
black     30.5     55.4    11.5
black      7.0     57.7    33.2
white     57.6     36.5     5.9
white     72.4     27.6     0.0
white     18.8     46.9    31.1
black     31.4     64.2     3.6
white     28.5     62.4     7.7
white     54.2     37.3     6.4
black     76.6      3.1    14.1
white     17.8      4.0    74.3
white     47.1     38.2    14.7
white     13.2     65.6    16.7
white     38.1     15.5    44.3
black     19.7     77.7     1.8
white     20.9     38.6    35.8
white     81.0     10.3     8.6
black     21.4     76.7     0.9
white     23.4     74.1     1.7
white     76.2      9.5     9.5
white     23.9     67.9     7.3
white     79.2      1.9    15.1
black     60.0     35.0     0.0
black     25.7     69.4     2.6
white     21.1     10.2    64.8
black      8.6     70.1    17.7
white     34.1      4.9     7.3
white     49.6     27.7    14.2
white     85.2     11.1     0.0
white     93.8      0.0     6.2
black     89.3      0.0    10.7
white     45.1     48.2     5.6
white     95.7      0.0     2.1
white      7.0     57.7    33.2
black     25.3     66.4     4.0
black     12.1     81.5     4.5
black     37.4     43.3    14.0
white     34.9     31.5    27.9
white     74.3     11.4    14.3
white     32.9     21.2    44.0
white     32.9     21.2    44.0
white     10.8     61.9    19.6
white     10.9     33.8    50.8
white     37.4     43.3    14.0
white     31.6     13.0    49.8
black     24.9     37.1    27.1
black     10.9     33.8    50.8
white     10.9     33.8    50.8
white     18.8     46.9    31.1
white     96.2      0.0     3.8
white     72.5     23.5     2.0
black     22.7     58.6    16.0
white     64.6      2.7    22.1
white     21.5     70.1     7.2
white     86.7      0.0    13.3
white     31.6     13.0    49.8
black      8.6     70.1    17.7
white     87.5      6.2     0.0
white     38.1      2.9    56.8
white     10.9     33.8    50.8
white     34.9     31.5    27.9
black     21.5     70.1     7.2
black      7.6     81.5     7.9
white     32.9     21.2    44.0
white     47.2      5.7    20.8
black     30.5     55.4    11.5
black     21.3     70.8     6.7
white      8.6     70.1    17.7
white     91.5      2.1     4.3
white     86.7      0.0     0.0
black     54.7     31.7    11.2
white     52.5     47.5     0.0
white     88.9     11.1     0.0
black     28.4     18.4    50.2
white     10.9     33.8    50.8
white     18.7     60.8    18.1
white     78.0      7.3    14.6
black      7.0     57.7    33.2
white     42.1     31.0    12.1
black     22.2     54.8    20.7
white     83.6      0.0    16.4
white     31.6     13.0    49.8
black     10.5     83.8     4.9
black     19.7     77.7     1.8
white     22.1     30.6    44.1
white    100.0      0.0     0.0
white     48.3     31.0    17.2
black      8.1     79.0    10.6
white     68.6     28.6     2.9
white     30.5     55.4    11.5
white     81.5     11.1     3.7
white     69.7     22.7     7.6
black     29.5     68.4     0.7
black     37.4     43.3    14.0
white    100.0      0.0     0.0
white     25.3     59.3     6.6
white     49.3     45.2     4.8
white     81.5      2.5    11.1
white     10.9     33.8    50.8
white      4.7     91.7     1.9
white     90.3      9.7     0.0
white     18.2     72.7     6.1
black     34.9     31.5    27.9
black     19.7     79.0     0.7
white     85.7     10.7     3.6
white     38.7     53.5     2.1
black     42.5     51.6     4.6
white     60.1     28.8     6.7
white     81.5      3.7    13.0
white     24.0     73.0     2.0
white     61.5      0.0    38.5
white     86.7      0.0     0.0
white     93.3      0.0     6.7
white     23.4      1.6    75.0
white     20.9     38.6    35.8
black     10.8     61.9    19.6
white     55.8     11.6    32.6
white     69.6     25.0     5.4
white     38.5     61.5     0.0
black      6.2     87.7     3.8
white     16.3     72.7     8.7
black     32.3      6.5     9.7
white     31.4     64.2     3.6
black     36.7     58.2     2.5
black     15.4      9.3    74.1
white     16.4     21.0    52.5
black     38.1     34.2    24.5
black     10.9     33.8    50.8
black     37.6     59.6     1.8
white    100.0      0.0     0.0
black     46.8     44.7     8.5
white     58.6     32.5     5.3
white     78.7      8.0     6.4
white     46.9     32.7     4.1
black     23.9     67.9     7.3
white     31.6     13.0    49.8
white     29.2     58.7    10.5
white     92.3      0.0     7.7
white     39.2     37.3    22.5
black     10.8     61.9    19.6
black     10.9     33.8    50.8
white     34.5     19.0    45.7
white     38.1     15.5    44.3
black     57.3     27.6    11.6
black      6.5     82.7     9.2
white    100.0      0.0     0.0
black     25.8      7.9    48.6
white     25.0     21.7    50.1
white     52.2      8.7    39.1
white     75.8      0.0    24.2
white     84.0      0.0    16.0
black     20.9     38.6    35.8
black      8.6     89.9     0.8
white     80.6      3.2     3.2
black     36.2     56.8     4.1
white     90.9      4.5     4.5
white     37.1     57.1     5.7
white     76.3      7.9    10.5
white     25.5     57.1    14.0
white     80.3     14.8     3.3
white     58.3      0.0     0.0
black     55.7     36.1     8.2
white     25.0     21.7    50.1
white     33.0     44.5    15.5
white     90.9      3.0     6.1
white     66.2     20.6    12.5
white     66.7     15.6    16.7
white     25.3     66.4     4.0
white     34.9     31.5    27.9
white     42.9     42.9     0.0
black     45.0     37.8    14.4
white     34.4     42.1    21.1
white     31.6     13.0    49.8
white     75.3     19.2     5.5
white    100.0      0.0     0.0
white     32.4     63.8     2.7
black     10.8     61.9    19.6
black     18.8     46.9    31.1
white     32.2     21.8    37.3
white     80.0      1.2    16.2
black     36.0     40.4    19.3
black     34.9     31.5    27.9
white     83.3     10.0     0.0
white     83.6      0.0    16.4
white     35.6     51.0    13.4
black     81.9     18.1     0.0
white     38.6      3.5    57.9
white     41.0     57.6     0.7
white     73.4      1.6    17.7
white     60.0      0.0    20.0
white     70.7      4.3    12.9
white     79.2      1.9    15.1
black     14.3     71.0    12.7
black     34.4     54.0     5.4
black     34.4     54.0     5.4
white     89.3      2.9     6.8
white     38.1     15.5    44.3
white     62.9     11.4     7.1
black     21.5     70.1     7.2
black     23.9     67.9     7.3
white     18.9     26.3    43.0
white     41.9     56.4     1.7
white    100.0      0.0     0.0
white     54.3     41.9     2.7
black    100.0      0.0     0.0
white     45.0     24.3    27.2
white     22.1     30.6    44.1
black     55.1     42.9     2.0
white     76.5      0.0    23.5
white    100.0      0.0     0.0
white    100.0      0.0     0.0
white    100.0      0.0     0.0
white     79.5     15.4     2.6
white     22.1     30.6    44.1
white     20.0     50.0     5.0
white     55.3     41.3     2.0
white     93.3      0.0     0.0
white     45.5     36.4    18.2
black     10.8     61.9    19.6
white      9.9      4.6    82.0
white      9.9      4.6    82.0
white     59.2     38.8     0.0
white     59.2     29.3    10.9
white     34.9     31.5    27.9
white     83.2      1.7     4.2
white     58.8     31.8     5.9
black     51.3      4.8    35.3
black     21.0     68.1     8.8
black     25.7     69.4     2.6
white     54.3     14.5    23.1
black      7.0     57.7    33.2
white     91.7      8.3     0.0
white     50.8     18.6    25.9
white     41.0     57.6     0.7
black      8.6     70.1    17.7
white     73.4      1.6    17.7
black     12.4     83.9     1.8
white     88.6      6.8     0.0
black      7.0     57.7    33.2
black     65.8     34.2     0.0
white    100.0      0.0     0.0
white     64.6      2.7    22.1
white     10.9     33.8    50.8
black      8.6     70.1    17.7
white     60.0     40.0     0.0
white     84.2      0.0    15.8
white     38.1     34.2    24.5
white     38.6     29.2    21.0
white      9.9      4.6    82.0
white     41.0     57.6     0.7
white     70.0     20.0    10.0
white    100.0      0.0     0.0
black     46.6     41.5     9.8
white     44.1      9.3    42.8
white     22.1     30.6    44.1
black     42.2     42.9     7.8
white     27.7     72.3     0.0
white     69.7     22.7     7.6
white     34.9     31.5    27.9
black     43.5     56.5     0.0
black     29.5     64.1     5.0
white      9.9      4.6    82.0
white     18.9     77.0     3.2
black     20.9     38.6    35.8
white     42.1     31.0    12.1
black     27.4     71.0     1.6
black     50.7     29.3    19.1
black     27.0     53.3    18.4
white     16.4     21.0    52.5
white     36.7     19.6    41.1
black     10.9     33.8    50.8
white     31.4     64.2     3.6
black     32.2     21.8    37.3
white     55.3     41.3     2.0
white     70.3     23.4     4.7
white     31.6      0.0    47.4
white     36.7     45.9    14.3
black     19.7     79.0     0.7
black     30.5     33.4    23.4
white     94.4      5.6     0.0
black     43.8     33.9    21.1
white     72.9     15.7    11.4
white     85.7      0.0     0.0
black     28.4     18.4    50.2
white     93.3      6.7     0.0
white     66.0     31.9     2.1
black     56.6     28.9    13.3
black      3.2     92.7     3.0
black     19.1     75.9     2.9
black     32.2     21.8    37.3
white     50.0     50.0     0.0
black     37.4     43.3    14.0
black     25.3     66.4     4.0
white    100.0      0.0     0.0
black     29.5     64.1     5.0
black     20.9     38.6    35.8
white     55.7      3.6    38.6
white     34.1      4.9     7.3
white     95.5      0.0     4.5
white     50.8     18.6    25.9
black     33.1     66.2     0.7
white     71.4      0.0    14.3
white     70.7      4.3    12.9
white      0.0      0.0     0.0
black      3.2     92.7     3.0
white     78.4     19.0     1.3
black     20.9     38.6    35.8
white     32.2     21.8    37.3
white     19.4     79.1     0.7
white     36.5     55.3     5.9
white     92.9      7.1     0.0
white     71.0     25.8     0.0
white     42.9     57.1     0.0
white     49.6     27.7    14.2
white     34.9     31.5    27.9
black     47.9     47.6     3.5
white     24.5     75.5     0.0
white    100.0      0.0     0.0
black      4.9     92.9     1.6
white     44.4     53.2     1.2
white     80.0      7.5    10.0
white    100.0      0.0     0.0
white     70.8     29.2     0.0
white     42.9     57.1     0.0
white     41.3     50.0     5.8
black     10.8     61.9    19.6
white     63.0      5.6    27.8
white     66.7      0.0     0.0
black     25.3     59.3     6.6
white     79.2      1.9    15.1
black      7.0     57.7    33.2
black     60.1     28.8     6.7
white     66.2     20.6    12.5
black      7.0     57.7    33.2
white     25.0     68.8     6.2
black     20.9     38.6    35.8
black     30.5     63.4     4.9
black     36.4     40.6    22.7
black     30.2     56.4    10.7
black      3.2     92.7     3.0
black     22.1     30.6    44.1
white     76.6     18.8     4.7
white     86.5      2.7     0.0
white     22.1     30.6    44.1
white     63.5      7.4    25.0
white     34.9     31.5    27.9
white     62.3     20.8    13.0
white     29.5     64.1     5.0
black     13.5     60.0    24.8
white     78.4     19.0     1.3
white    100.0      0.0     0.0
white     11.1      0.0     2.6
white    100.0      0.0     0.0
white     18.8     46.9    31.1
white     90.0      0.0     0.0
white    100.0      0.0     0.0
white     64.0     14.7    12.0
black      8.1     84.6     6.2
white     93.9      0.0     2.0
black     19.7     47.8    20.3
white     31.6     13.0    49.8
white    100.0      0.0     0.0
white      7.0     57.7    33.2
white     19.4     79.1     0.7
white     18.8     46.9    31.1
white     84.4      0.0     6.2
white     42.1     31.0    12.1
white     66.7      8.3    25.0
black     36.0     40.4    19.3
black     18.9     77.0     3.2
white     94.1      0.0     5.9
white     75.0      0.0     3.1
white      9.9      4.6    82.0
white     23.9     67.9     7.3
black     46.6     41.5     9.8
white     33.1     10.4    47.8
black     10.9     33.8    50.8
black     23.9     67.9     7.3
white     46.9     32.7     4.1
white     58.3     29.8     9.5
black     32.4     63.8     2.7
white     57.7     15.9    20.1
white     38.1     34.2    24.5
black      4.7     91.7     1.9
white     25.7     69.4     2.6
white     34.9     31.5    27.9
white     42.9     57.1     0.0
white     87.5     12.5     0.0
black     58.6     32.5     5.3
white     24.9      6.1    66.8
white     37.4      9.5    46.9
white     79.5     15.9     0.0
white     54.3     41.9     2.7
black     64.5     35.5     0.0
black     10.9     33.8    50.8
black     25.0     31.4    40.8
white     59.2     29.3    10.9
black     44.6     45.7     8.7
black     46.9     53.1     0.0
white     91.7      4.2     4.2
white     73.5     15.7     9.6
white     72.1     23.3     3.5
white     88.9      8.3     2.8
black      9.7     86.3     3.6
white     60.9     34.8     4.3
black     45.1     45.7     8.5
white     25.8      7.9    48.6
black      8.6     70.1    17.7
black      8.6     70.1    17.7
white     31.6     13.0    49.8
white     81.2     12.5     6.2
white     31.6     13.0    49.8
white     15.6     80.5     1.3
black     20.9     38.6    35.8
black     19.9     11.2    58.0
black     34.9     31.5    27.9
black      8.6     70.1    17.7

In my dataset, there are 245 Black individuals and 501 White individuals. Thus, the "raw" odds of being Black in the sample is 245/501 = .49. I can reproduce this value when I run a logistic regression that only includes the intercept:

summary(glm(race == "black" ~ 1,
data = df,
family = binomial(link = "logit"))) 

Call:
glm(formula = race == "black" ~ 1, family = binomial(link = "logit"), 
data = df)

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept) -0.71535    0.07796  -9.176   <2e-16 ***

This intercept value (-0.71535) exactly reproduces the raw odds ratio of .49:

round(exp(-0.71535), 2)
[1] 0.49

However, when I include some standardized predictors (i.e., with a mean of 0 and standard deviation of 1), I find that the intercept changes value:

Call:
glm(formula = race == "black" ~ 1 + scale(whiteHom) + scale(blackHom) + 
    scale(hispHom), family = binomial(link = "logit"), data = df

Coefficients:
                Estimate Std. Error z value Pr(>|z|)    
(Intercept)      -1.0247     0.1039  -9.864  < 2e-16 ***
scale(whiteHom)  -0.4091     0.3911  -1.046  0.29550    
scale(blackHom)   1.1423     0.3635   3.142  0.00168 ** 
scale(hispHom)    0.1921     0.2755   0.697  0.48560    

The intercept has now changed to -1.0247, which produces an odds ratio of .36:

round(exp(-1.0247), 2)
[1] 0.36

How do I interpret this effect? Does this mean that the odds of a person being Black in the sample is .36 when controlling for these three variables? The intercept becomes more negative when I add additional standardized predictors.

I would appreciate an explanation as to why this is happening, as the intercept is important in my analysis. My understanding is that the intercept in a logistic regression should always reflect the observed odds ratio (.49) if all predictors are standardized. However, this is clearly not the case with this data.

Is this understanding incorrect, and if so, why? Any explanations with links to further reading would be a bonus.

$\endgroup$
12
$\begingroup$

As Noah says but just with formulas ...

Consider logistic regression $$ \Pr(Y=1) = \frac{\exp(\beta_0 + \mathbf x^\top\beta)}{1+ \exp(\beta_0 + \mathbf x^\top\beta)}$$ and then offcourse

$$ \Pr(Y=0) = 1- \Pr(Y=1)=1 - \frac{\exp(\beta_0 + \mathbf x^\top\beta)}{1+ \exp(\beta_0 + \mathbf x^\top\beta)} = \frac{1}{1+\exp(\beta_0 + \mathbf x^\top\beta)}$$

Assuming that you are using demeaned raw variables $\mathbf z$ to get covariates $$\mathbf x = \mathbf z - \mathbf{ \bar z}$$ then $\mathbf x= 0$ is equivalent to $\mathbf z = \mathbf {\bar z}$. Inserting $\mathbf x = 0$ in the formulas above the probabilities reduce to

$$\Pr(Y=1) = \exp(\beta_0) /(1+\exp(\beta_0)) \phantom{xxx}\wedge \phantom{xxx}\Pr(Y=0) = 1 /(1+\exp(\beta_0))$$

hence odds at the mean

$$\frac{\Pr(Y=1)}{\Pr(Y=0)}\biggr\rvert_{\mathbf z=\mathbf { \bar z}} = \exp(\beta_0)$$ and log odds at the mean $$\log \frac{\Pr(Y=1)}{\Pr(Y=0)}\biggr\rvert_{\mathbf z=\mathbf { \bar z}} =\beta_0$$

Compare this to the case where evaluation is not at the mean and assume for simplicity that $\mathbf x$ only includes one covariate such that $$\log \frac{\Pr(Y=1)}{\Pr(Y=0)}=\beta_0 + \beta_1 x_1$$ it then makes sense in the case where $x_1$ is a continuous covariate to differentiate the log odds with respect to $x_1$ to get $\beta_1$. This is never the case with the intercept because it is not a coefficient of a continuous regressor, hence it never makes sense to speak of the intercept as marginal log odds in the sense here used.

$\endgroup$
  • $\begingroup$ Great, clear answer. There were some typos in the expressions but I've fixed them. Glad you emphasized that "it never makes sense to speak of the intercept as marginal log odds in the sense here used". I'm not sure where OP would have learned this. $\endgroup$ – Noah Oct 2 '19 at 13:09
  • $\begingroup$ super, thx for the edit. $\endgroup$ – Stop Closing Questions Fast Oct 2 '19 at 13:39
10
$\begingroup$

Welcome to CV. You have misunderstood the interpretation of the intercept. The intercept is the log odds (not the odds ratio) of the outcome when all the predictors are at 0 (not the marginal log odds, as you described). When the predictors are standardized, this corresponds to when all the raw predictors are at their mean. So, for an individual with average levels of each of the predictors, the intercept is the log odds of the outcome. This may not be an interpretable value because it might not make sense to think of an individual with average levels of all the predictors.

$\endgroup$
  • 1
    $\begingroup$ Thanks, Noah. Just to clarify, the intercept will not always equal the marginal log odds, even if all predictors are standardized? Can you give more detail as to when and why this would happen? $\endgroup$ – David Johnson Oct 2 '19 at 6:11
  • 1
    $\begingroup$ It will never equal the marginal log odds unless the intercept happens to be set to what the marginal log odds is (and that would be extremely rare). $\endgroup$ – Noah Oct 2 '19 at 13:12
2
$\begingroup$

an alternative explanation is the margin odds are incorporated into your fitted values. The ML gradient equations (set to 0) are equal to the following constraints....

$$\sum_i p_i = \sum_i y_i$$ $$\sum_i x_{1i}p_i = \sum_i x_{1i}y_i$$ ... $$\sum_i x_{ki}p_i = \sum_i x_{ki}y_i$$

Where $p_i$ is the fitted probability, $y_i$ is the 0-1 indicator you are modelling, and $x_{ji}$ is the jth predictor (with k predictors in total). The first constraint means for your data, the fitted probabilities always add up to 245 - this is regardless of what else you include in the model. So the "marginal log-odds" should be more like this... $$\log\left[\sum_i p_i\right] -\log\left[\sum_i (1-p_i)\right]$$

This will always equal to $\log\left[\frac{f}{1-f}\right]$ with $f$ being the total proportion of $y_i$ equal to 1 in the sample. whether the predictors are standardised or not

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.