This article describes how to compare time periods when you do not have regular time intervals. For example, you want to compare Nov against May, and May against Feb. With the same example data, the average statistic of 1.3 is significantly less than Feb ’18 for the first row.
The solution is to create a dummy date variable, and then to relabel the time intervals (using a rule). In this post, I explain how you can do this via a worked example.
A data set with irregular wave data
Create your dummy date variable
Creating a dummy date question is essentially the same as creating a date question, except you give the variable dates that are bogus and regular. I typically set each period at 1001 with each successive wave as a year (so 1001, 1002, 1003, etc). Using a ridiculous date such as 1001 AD means there will never be any doubt that it’s a dummy date variable!
if (dip == 1) Q.EncodeDate(1001,01,01);
else if (dip == 2) Q.EncodeDate(1002,01,01);
else if (dip == 3) Q.EncodeDate(1003,01,01);
else if (dip == 4) Q.EncodeDate(1004,01,01);
Apply a rule to change the labels:
In the Automate menu, we have a rule that can manually relabel column labels. It can be found under
- Automate > Browse Online Library > Modifying Headers > Automatically Rename Column Labels.
So basically, you rename ‘1001’ to be whatever you want (eg: the first dip). Likewise for ‘1002’, etc. So in the above example, I applied the rule (multiple times) to make the following:
Set the statistical assumptions
Finally, don’t forget to change the Statistical Assumptions (under Table Options or Project Options) to compare to the previous period for Date questions. (The previous post notes how to do this). The footer on the bottom right should display this setting.