RATS 10.1
RATS 10.1

Find in Files

"Find in Files" is a feature for helping you locate RATS programs or examples which have specific instructions or phrases in them. (For instance, to locate examples of GARCH models). To use it, choose the menu operation Help—Find in Files:

 


 

which will bring up the following dialog box:


 



 

Enter the text into the Text to Find box. This would find uses of the MV=BEKK option for a GARCH model. You want to be careful about the choice of search string so you don't get too many "hits". For instance, BEKK by itself would likely match many comments. The Case Sensitive and Use Regular Expressions checkboxes apply to the search. It's usually not a good idea to do a Case Sensitive search since the RATS language isn't case-sensitive. If you understand them, Regular Expressions can be very handy in restricting the search.

 

By default, the search will be of the standard location for programs and examples installed with RATS. We recommend that you check the Search in Subdirectories box, since that will include the textbook and paper replication directories as well. This will bring up a Results Window similar to this:


 


 

This shows the lines from the searched files which match the requested text. Note that some files might have multiple matches (garchmv.rpf here for example). The number in parentheses after the file name is the line number of the matched text. If the line is very long, only the part of it around the matched text will be shown. If you double-click on a line, it will open the file in a text window and put the cursor on the matching text.

 

If you would like to run an example that you've found this way, its data file is probably in the same directory as the example. To make it easier to find that, the directory where the chosen example is located is put at the top of the Recent Directories list. Choose the File-Recent Directories operation and take the top line from the list.


 


 

Once you've done that, you just need to make the chosen text window the Input Window, create an Output Window if needed, select all and run. The Results Window will stay around until you close it, so if you want to go back and check out a different example, you can do that.


 


Copyright © 2025 Thomas A. Doan