Hi,
I have been struggling for a long time with a very specific thing that I am trying to get out of SPSS. Essentially the dataset that I am working in contains information about commercial flights over time. A data entry shows information on things like average price, distance and so on for a specific carrier in a specific year on a specific route.
Some of these carriers are low cost carriers, and I have created a dummy variable to identify each data entry that contains all this info for a low cost carrier. What I am trying to implement now is another dummy variable that indicates whether in the year on the specific route there is an LCC operating or not. In other words, when computing the variable I need SPSS to check for a specific data entry what the values for route and year are, and then it should check all other data entries with the same year and route. If there is at least 1 data entry in this group where the low cost dummy has a value of 1, then the variable should also be 1. This way I can see on what routes in which time periods airline carriers are competing with low cost carriers. To make things simpler I already made an additional variable "route_yr" which is simply a unique variabale containing info on the route and the year at the same time.
I think it should be possible but long time struggling myself with the LAG function as well as resorting to ChatGPT have not been able to bring me any further yet. Thanks!
------------------------------
Brent Van Campenhout
------------------------------