Subscribe Bookmark RSS Feed

Problems retrieving a (saved?) local data filter

KatrineK

New Contributor

Joined:

Nov 7, 2016

I'm new to JMP, so bear with the basic questions. I'm using a local data filter to run some of my analyses on subsegments of my sample (e.g. only people who answered between 1-5 in a question). I've tried saving this filter to avoid setting it up again for the following analyses, but without luck. Well, the filter initially seems to be saved (to the data table), but when running the next analysis (from the same data table) there are no existing filters to choose from in the dropdown (actually it's seems inactive). It's quite cumbersome to re-type the filter, so I'd highly appreciate help. 

And by the way, I'm working on a subset of a data table - could that be the reason I cannot save/retrieve the local data filter? If so, is there a way to save the subset as a new data table? 

3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Let me see if I can help with your issue. If I understand what you did was that you ran a platform(Distribution, Fit Y by X, etc.) and then applied a Local Data Filter to that platform. Then you saved that filter's script to the data table. Your then expectation, was that when you ran a subsequent analyses that the filter would be applied to those.
I understand your logic, however, you are using the wrong filter. A Local Data Filter, is only applied to the Platform it was attached to. What you really need to do, is to apply a "Data Filter", which affects the data table, and therefore all subsequent analyses applied to that data table.
Click on your data table, or on the Platform you are running, and then go to:
Rows==Data Filter
from the pull down menus.
Once you select the column(s) you want to filter on, then select all three check boxes of "Show", "Select" and "Include". What you will then see, is that when you apply your filter selections, the rows in the data table will become "Hidden and Excluded" based upon the filter.
If you then open a new or different platform, the analysis run, will include only those rows that are not "Hidden and Excluded". Typically, what is done if you want all analyses done on the data table in the future to be only run on the non "Hidden and Excluded" rows, you can just save the data table. The next time it is opened up, it will have all of the "Row States" that were set when the table was saved. Therefore, the "Hidden and Excluded" rows will remain in that state.
You can save the Data Filter script to the data table. However, saving a script to a data table does not mean that the script will be run the next time the table is opened. Saved scripts are only run when the user interactively selects it to be run.
Of course, any saved script can have calls to run other saved scripts.
I hope this explanation helps and doesn't just confuse the issue more.
Jim
KatrineK

New Contributor

Joined:

Nov 7, 2016

Hi Jim

Thanks (again :) for your quick reply. Well, I got a little confused from your explanation. I found the Data Filter and created one. That led me to run the analysis solely on the selected rows. However, I still don't see how this is an easy way of doing things if I want to run multiple analyses and shoft between all data and a subset of it. So let me try to explain what I ideally would be able to do: 

 

I want to be able to run an analysis (e.g. Fit Y by X) on the entire data table. When I have the results of this analysis (in what you call a "platform"?), I would like to be able to run the exact same analysis on a subset of the full dataset. So, up until now, I've applied a local data filter to the results, which instantly adjusts the results on the basis of my deselections. However, instead of retyping the filter I would like to be able to apply a saved filter or run a script that sorts out those data points I'm not interested in. I realize that there is an option to save the data filter script, but I don't know how to apply that script to a new analyses. Perhaps you can point me to that?Does it make sense or am I just repeating myself here...?  And again, sorry for these beginner's questions! 

txnelson

Super User

Joined:

Jun 22, 2012

There are a few ways to do what you want to do. My preference would be to open the platform you want to run(Fit Y by X, etc.), fill in the dialog box information and click on OK, and get your results. Then open a Data Filter, not a Local Data Filter. The reason for this, is that the filtering you want to do, you want to go across potentially multiple platforms, and yes you can have them open at the same time and the filter will work on all of them. Set the filter settings to the subset you want., and save it's script to the data table. If you have other filter options you want, you can select them, and then save the filter's script to the data table again, and give it a different name. Now for a new piece of information. By default, if you apply a Data Filter (not a Local Data Filter) to an already open platform(Fit Y by X), it will not change the analysis that has already been done. So if you then go to the red triangle and if in JMP 12 or earlier go to "Script", or in JMP 13 go to "Redo" and select Redo, JMP will rerun the platform with all of your current settings, but this time, since there is a Data Filter in effect, the Redo will run on only the subsetted data. The nice advantage to this, is that you will have 2 separate outputs, one for each different data levels.
Now if you want to move to a different platform and do the same two step process, you will need to clear the Data Filter to bring all rows back into the analysis, and then close the data filter. You will see why in just a second. Now you are back to a clean slate. Bring up the next platform you want to run....Graph Builder, Distribution, etc. and run the platform. Now you will want to subset the data again, and Redo the operation. Go to the Data Table, and to the Table Panel top left of the data table, and find the data filter script you saved. Click on it and run the filter. It will open the filter, and apply the settings to the data table. If the filter had not been closed, running the script will not work, because it will see that a filter is already open.  Now all you have to do, is to select to Redo the platform.

I sure hope this makes sense to you. I sure don't want to confuse you. I think that this method will work well, when there is a complex subsetting you want to do over and over again.

You may also want to think about using the Data Filter, and then going to the red triangle and selecting "Show Subset". It will create a separate data table of the subsetted data. Now you just apply the platforms separately. Run it on the full data. Click on the subsetted data, open the same platform. In the dialog box, click on "Recall{" and it will fill in the dialog box with the same settings that were used for the full table analysis.....this might be a way that works well for you.

Jim