Comparing your Results to the Previous Period in Q
Q has a terrific feature whereby it can automatically compare statistics against the previous period (of time). This is great for tracking scenarios, when you are only interested in whether a figure has gone up/down since the last reporting period. Q gives you this ability if you are working with a Date question in a crosstab. We illustrate this in the first part of this post.
While it is a fantastic feature, it only works if you have a Date question as the columns of the crosstab. You must have a variable in your project that uses date-time data format.
It is frequently the case that researchers receive a categorical variable to encode the period of interviewing (rather than a date-time variable). It could be quarters, weeks, or some other ordinal information (e.g. wave). If this is your situation, don’t fear, because you can turn your categorical question into a Date question in Q.
The purpose of this post is how you can set up your data to compare to a previous period. If you already have a Date question, then you only need to follow through section 1 below.
- The first part shows you how you can set the statistical assumptions to compare to previous period with a date/time question. This is documented on our Q wiki here.
What is “comparing to the previous period”, statistically speaking?
In a crosstab in Q, each cell in a row is compared to its complement by default. In the table below, Q considers the 2.4 average figure significant. This is because it compares it to the sample that is NOT Jul-Sep (i.e. is Jan-Jun). Testing against the complement is useful in a normal table, because you’re often looking for interesting differences among any of the columns. In this case, however, we might specifically want to compare each period to the preceding one.
Tip: in Q, highlight the individual cell and push α (in the ribbon, or via right-click). The information includes the null hypothesis which tells you (in English) what you are comparing.
Consider what happens when you update your project to include a new quarter’s worth of data. In this example, the table updates automatically to include an Oct-Dec column. Now the significance indicators change, as per the below table. In this case, Q no longer highlights 2.4 as interesting in the context of the four quarters. Why? It is too close to the average of the other three periods combined – that is, (0.6 + 0.9 + 4.3) / 3 = 1.9
Now if we set Q to use Edit > Customize > Project Options > Statistical Assumptions > Compare to the previous period, then the indicators display something different. Consider the table below. Q suddenly considers the 2.4 significant. This is because it is comparing Jul-Sep to the period immediately prior (Apr-Jun). Q still highlights the 4.3, but for a different reason than before (4.3 now tests significantly higher than 2.4). By contrast, The 0.9 average (for Apr-Jun) is no longer significant, because it is higher than 0.6 on a pairwise test. Again, you can use α to see the test for yourself, this time selecting the relevant pair of cells.
How do you enable comparing to the previous period?
You can enable this feature by going to either the Table or Project options via Edit > Table Options or Edit > Project Options > Customize. Within the Table/Project Options is a Statistical Assumptions tab, and on the bottom left is a drop-down menu for Date questions, where you can set it to compare to previous period. We have this documented on the wiki here.
Whether this setting is on or off, it will be clarified in the footer of the table by default when you use a Date Question. It will either say “Significance Testing: Compare to previous period” or “Significance Testing: Compare to rest of data”.
How do you turn a categorical variable into a Date question?
if (wave == 1) Q.EncodeDate(2018,01,31); else if (wave == 2) Q.EncodeDate(2018,02,28); else if (wave == 3) Q.EncodeDate(2018,03,31); else if (wave == 4) Q.EncodeDate(2018,04,30);
You now have a new numeric variable in your Variables and Questions tab. Change the variable type to “Date/Time” and you’ll now have a new Date/Time question. Be sure to check the Values to set your desired aggregation.
This Date/Time question will now be available for you to use in your cross-tabs. And, pertinently, for use with the statistical testing against previous period!
Author: Matt Steele
Matt has over 14 years of experience in the marketing research arena, with a combination of research experience (qualitative and quantitative), marketing training, academic psychology (cognitive), creative leadership, geekiness and artistic flair. He currently works for Displayr (the home of Q and Displayr) and is based in London: supporting, selling, marketing and training for Q research software and associated software packages (eg: Displayr). He holds a Honours degree in Psychology from UNSW, a Grad Cert. in Marketing from UTS, and a Grad Dip in Directing from NIDA (all based in Sydney, Australia).