Corrected pattern calls so that analysis variables do not have to come first in the data.