Performing the comparisons

With the previous three steps completed, you're ready to begin comparisons. The commands below can be repeated as often as desired throughout a session.

This command produces a plot with spline estimations and 95% confidence intervals. It shows the difference between the vowels of “bad” and “ban” to be statistically significant at portions of some formants.

compareformants("bad","ban",data)

Here's a command to compare “bab” and “bam”

compareformants("bab","bam",data)

To round it out, a comparison of “ban” and “bam”

compareformants("ban","bam",data)

Variations are produced by adding optional parameters to the command. The command below produces the bad/ban plot, but in colors that print better in black and white:

compareformants("bad","ban",data,bw=TRUE)

Another option parameter produces a plot of the interaction effect, with a Bayesian confidence interval:

compareformants("bad","ban",data,BCI=TRUE)

These optional parameters can be combined. For instance, what follows produces the plot of the interaction effect, but in the different colors.

compareformants("bad","ban",data,BCI=TRUE,bw=TRUE)

The optional parameters can be given in any order. The following command is equivalent to the previous one.

compareformants("bad","ban",data,bw=TRUE,BCI=TRUE)

Since we know the parameters can be combined like this, subsequent illustrations will show one optional parameter at a time. They can still be combined, however.

This command changes the range of the y-axis so that it starts at zero and goes up to 5000.

compareformants("bad","ban",data,yrange=c(0,5000))

Or so that it starts at 100 and goes up to 4500:

compareformants("bad","ban",data,yrange=c(100,4500))

You can choose to create an EMF image file instead of showing the plot on the screen:

compareformants("bad","ban",data,output="emf")

Or, similarly, produce a PDF file:

compareformants("bad","ban",data,output="pdf")

If you don't want to compare a certain formant, you can specify that. The following plots F1 and F2, but not F3:

compareformants("bad","ban",data,f3=FALSE)

The following plots F1 and F3, but not F2:

compareformants("bad","ban",data,f2=FALSE)

# the following plots F1, but not F2 or F3

compareformants("bad","ban",data,f2=FALSE,f3=FALSE)

...and so forth...

Note that if you input file does not contain a formant column, you must use one of the above options. For instance, if your file does not have a column for F3, then you must use the optional parameter "f3=FALSE". Otherwise you will get an error.

To output the plots in CSV format, set the CSV parameter to TRUE. This will create a separate .csv file for each formant, for each word.
compareformants("bad","ban",data,csv=TRUE)

All contents © 2024 Adam Baker, except where otherwise noted.