| 1 | <html><head><meta name="robots" content="index,follow"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 2 | <title>Logistic regression</title> |
| 3 | <style> |
| 4 | td { padding-left: 5pt; padding-right: 5pt; } |
| 5 | th { padding-left: 5pt; padding-right: 5pt; } |
| 6 | code { white-space: pre-wrap; } |
| 7 | dd { white-space: pre-wrap; } |
| 8 | </style> |
| 9 | </head><body bgcolor="#FFFFFF"> |
| 10 | |
| 11 | <table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Palatino,Times" size=6 color="#999900"><b> |
| 12 | Logistic regression |
| 13 | </b></font></table></table> |
| 14 | <p>This page explains how you do logistic regression with Praat. You start by saving a table in a text file (if it contains non-ASCII symbols such as æ or ɛ, use the UTF-8 or UTF-16 format). The following example contains natural stimuli (female speaker) with measured F1 and duration values, and the responses of a certain listener who is presented each stimulus 10 times.</p> |
| 15 | <code> F1 Dur /æ/ /ɛ/<br></code> |
| 16 | <code> 764 87 2 8<br></code> |
| 17 | <code> 674 104 3 7<br></code> |
| 18 | <code> 574 126 0 10<br></code> |
| 19 | <code> 566 93 1 9<br></code> |
| 20 | <code> 618 118 1 9<br></code> |
| 21 | <code> 1025 147 10 0<br></code> |
| 22 | <code> 722 117 7 3<br></code> |
| 23 | <code> 696 169 9 1<br></code> |
| 24 | <code> 1024 124 10 0<br></code> |
| 25 | <code> 752 92 6 4<br></code> |
| 26 | <p>In this table we see 10 different stimuli, each characterized by a certain combination of the factors (independent variables) <i>F1</i> (first formant in Hertz) and <i>Dur</i> (duration in milliseconds). The first row of the table means that there was a stimulus with an F1 of 764 Hz and a duration of 87 ms, and that the listener responded to this stimulus 2 times with the response category /æ/, and the remaining 8 times with the category /ɛ/.</p> |
| 27 | <p>A table as above can be typed into a text file. The columns can be separated with spaces and/or tab stops. The file can be read into Praat with <b>Read Table from table file...</b>. The command <b>To logistic regression...</b> will become available in the <b>Statistics</b> menu.</p> |
| 28 | <h2>What does it do?</h2> |
| 29 | <p>The logistic regression method will find values <i>α</i>, <i>β<sub>F1</sub></i> and <i>β<sub>dur</sub></i> that optimize</p> |
| 30 | <table width="100%" style="white-space:pre-wrap"><tr><td align=middle><i>α</i> + <i>β</i><sub><i>F1</i></sub> <i>F1</i><sub><i>k</i></sub> + <i>β</i><sub><i>dur</i></sub> <i>Dur</i><sub><i>k</i></sub> = ln (<i>p</i><sub><i>k</i></sub>(/ɛ/)/<i>p</i><sub><i>k</i></sub>(/æ/))</table> |
| 31 | <p>where <i>k</i> runs from 1 to 10, and <i>p</i><sub><i>k</i></sub>(/æ/) + <i>p</i><sub><i>k</i></sub>(/ɛ/) = 1.</p> |
| 32 | <p>The optimization criterion is <i>maximum likelihood</i>, i.e. those <i>α</i>, <i>β</i><sub><i>F1</i></sub> and <i>β</i><sub><i>dur</i></sub> will be chosen that lead to values for <i>p</i><sub><i>k</i></sub>(/æ/) and <i>p</i><sub><i>k</i></sub>(/ɛ/) that make the observations in the table most likely.</p> |
| 33 | <p>Praat will create an object of type <b>LogisticRegression</b> in the list. When you then click the <b>Info</b> button, Praat will write the values of <i>α</i> (the <i>intercept</i>), <i>β</i><sub><i>F1</i></sub> and <i>β</i><sub><i>dur</i></sub> into the Info window (as well as much other information).</p> |
| 34 | <p>The number of factors does not have to be 2; it can be 1 or more. The number of dependent categories is always 2.</p> |
| 35 | <h3>Links to this page</h3> |
| 36 | <ul> |
| 37 | <li><a href="Statistics.html">Statistics</a> |
| 38 | <li><a href="What_was_new_in_5_0_.html">What was new in 5.0?</a> |
| 39 | </ul> |
| 40 | <hr> |
| 41 | <address> |
| 42 | <p>© ppgb 20141001</p> |
| 43 | </address> |
| 44 | </body> |
| 45 | </html> |