 One of the important steps in analysis is the ability to drill down, to focus on specific cases in your data set. Demovie allows you to do that by filtering cases. To do this, I'm opening this data set that I've called filtering cases. And I'm showing you a little bit of descriptive statistics here, the number of cases, 173. And the minimum and maximum for two of the calculated variables at the end of the data set. To get to filters, come here to data and click on the filter. It looks like you're pouring filter in a kitchen. And when you click on that, you get the opportunity to enter your text for a filter. You can click in here, and you can choose various functions, and you can choose existing variables. And you can simply click on them. So I can go, for instance, ID and then less than 10. And that will give me the first nine cases, those that have ID numbers less than 10. And I have a variable over here called ID. So I'm going to hit Return for that. And now what you see is I have a new column here called Filter1. You can't change the name of the filters. They're just 1, 2, and so on. And I have a green check mark for all of the cases that are selected. And you see them here. And a red X for all of the cases are not selected, and their rows are grayed out. And now you can see that I have only nine cases. And we have different statistics because they're calculated only for those particular nine cases. By the way, if you want to close this, just hit the Up button like that. And there's our nine cases from our first filter. But you probably want to do more than that. And so Jamobi allows you to use more than one filter in combination or trading off with another one. And it allows you to do more sophisticated filter commands. Let me come back to filters here. And I'm going to add a new filter. I'm simply going to press the plus. By the way, what the eye here does is it shows your height to the filter column that's on the left. You see, it says filter 1. If I hide that, then you just don't see it anymore, even though the filter is still operative. I'm going to do a new filter. And this time I'm going to paste something in. And what I have here is a filter that draws on this calculated column. So I'm going to hit Filter. And I'm selecting all cases with a mean greater than 4. And if I double click on this, you'll see that the mean comes from the average of these three variables, 1, 2, and 3, even though this one has text. But note that if I click on it, you can see that there are numbers underneath it. And I'm going to show you how that works in a later filter. But now I have this second filter. And you can see I only have one case that's selected, because I'm using both of my filters at once. If I only want one filter, I'm going to come back here to Filter 1. And I'm going to make it inactive by turning it off. And now I have more cases that are showing. Coincidentally, it's still only nine cases that have values of more than four on the mean. I'm going to make another filter. First, I'll turn this one off. I'm going to make a third filter here. And this time I'm going to paste it in. And what I'm going to use is the Z-score variable. That's one over here. Now, the thing you need to know about Z-score is because it's got this dash in it, I have to surround the name of the variable with back ticks. Those are where the tilde key is to the left of the one on your keyboard. Now, if you select this by going to f of x and you simply click on it, it will automatically put in the back ticks. And this time I'm putting in something less than two and more than two. But I'm getting a problem. And that is it doesn't want to do it, because it says I have a V or column function. That's because Z-score, let's go back to this, Z-score depends on the mean of the variable that we're looking at, which is mean, and the standard deviation, which means it has to calculate that for all of the cases that are in that column. You can't do a filter on that. You get sort of an infinite regress. So I'm going to come back to here. And I'm going to turn that filter off. But I'm going to show you the way that you can do that. Now, one choice is to simply copy the values in the Z-score variable, paste them into a new one. And now they're no longer formula. They're just text. And you can operate them like any other variable. But that really compromises the functionality of Jmovi. You lose the ability to easily replicate the functions, because that's not a formula-based approach. A better way to do it, even though it's slightly more complicated, is to include the Z-score function in the filter itself. So let me come back here and click on this new filter. So you see I now have a filter for right here. I'm going to paste in a filter. And now I actually have the Z formula in the filter. And when I hit Return, now we don't see the Z-score for this one anymore. It had a value of 4.33. That's going to be a high Z-score. But you can see that all of these others are within a particular value. Now, this is nice if you want to choose the cases that are between two values. But often when you're using Z-scores, you want to look at the extreme cases to identify outliers. And the intuitive thing would be to simply flip around these relational operators, the less than science, to make them greater than science. But let me show you what happens when you do that. First, I'll turn this off. I'll create a new filter. So this filter number five, I'm going to paste it in. And you see, this one's the same as above, except I flipped around the less than and replaced them with greater than science. Well, I'm going to get a problem with that one. And what it is, is it's excluded every single case because of the way it's parsing the logic of this one. This doesn't work. Instead, what you need to do is you need to do two separate statements joined by an OR. So I'm going to turn that one off, open it up, and paste in this other filter. And now you see that I say Z for the mean score is either less than negative 2, and then OR, Z mean, is greater than 2. Please note, in a lot of languages, things like AND or need to be in capitals. In Jobe, they need to be lower case. Also, if you're writing in a language like R, you can use the pipe, the vertical line character, to signify OR. That doesn't work here. You need to type lower case OR. And when I run that one, now you can see that it's selecting cases that are unusually high and also some that are unusually low. So we can join the two in a single statement to filter out and get the extreme cases. Now I want to show you one more example of how filters work. First, I'm going to make this one inactive. So we have all the cases again. And I'm going to press plus. And I'm going to paste in my seventh filter. And this one uses the variable like product. That's this one right here. Again, because I have a space or a non-standard character in the title, I have to put the name of the variable in back text. By the way, that's a good enough reason to never have spaces in your variable names. That way, you don't have to do something like that. And I'm going to select cases that are either 4s or 5s. Now in this case, I'm using 4, because I know that's agree. In fact, let me just run this. And I'm going to click on this again. You'll see here that 4 is agree and strongly agree is 5. And you can use either the value or the label. But if you use the label, you need to put it into quotes, not back text, because back text are only for the names of variables, but in quotes. Also, if you're not familiar with programming, you know that you don't use equals, because that's usually what's called an assignment operator, say this variable gets this value. You have to use the two equals signs together. And that means is equivalent to. So like product is equivalent to 4, or like product is equivalent to strongly agree. That gets me the 4s and the 5s, the agrees and the strongly agrees. And so that's an exploration of how filters operate many different ways in Jmovi. They allow you to focus on particular cases to find the things that are most interesting in a particular data set and drill down to focus on those, give them the attention they deserve, and hopefully get some new insights out of your data.