
This page explains how you do logistic regression with Praat. You start by saving a table in a text file (if it contains nonASCII symbols such as æ or ɛ, use the UTF8 or UTF16 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.
F1 Dur /æ/ /ɛ/
764 87 2 8
674 104 3 7
574 126 0 10
566 93 1 9
618 118 1 9
1025 147 10 0
722 117 7 3
696 169 9 1
1024 124 10 0
752 92 6 4
In this table we see 10 different stimuli, each characterized by a certain combination of the factors (independent variables) F1 (first formant in Hertz) and Dur (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 /ɛ/.
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 Read Table from table file.... The command To logistic regression... will become available in the Statistics menu.
The logistic regression method will find values α, β_{F1} and β_{dur} that optimize
α + β_{F1} F1_{k} + β_{dur} Dur_{k} = ln (p_{k}(/ɛ/)/p_{k}(/æ/)) 
where k runs from 1 to 10, and p_{k}(/æ/) + p_{k}(/ɛ/) = 1.
The optimization criterion is maximum likelihood, i.e. those α, β_{F1} and β_{dur} will be chosen that lead to values for p_{k}(/æ/) and p_{k}(/ɛ/) that make the observations in the table most likely.
Praat will create an object of type LogisticRegression in the list. When you then click the Info button, Praat will write the values of α (the intercept), β_{F1} and β_{dur} into the Info window (as well as much other information).
The number of factors does not have to be 2; it can be 1 or more. The number of dependent categories is always 2.
© ppgb 20141001