Tuesday, April 17, 2012

Creating Variables: Out-of-state Flag


Sometimes it’s good to see which of your students or donors are in-state because an in-state population may be more likely to enroll or be retained or give than an out-of-state population. Creating an out-of-state flag from a “state” variable allows you to easily differentiate between your in-state and out-of-state prospects. I should also note that it is just as easy to create an in-state flag if that better suits your data. In any case, here’s how:

The first step is to hook your data source to a transform node:

Because we’ll be creating a binary (“yes or no”) variable, we’ll want to click on the “if” button (at the top of the buttons on the right side), which will automatically generate an equation that we can change to suit our data. 

In the “Enter a Formula” window, we’ll want to edit the auto-generated equation so it reads:



Where ‘[A]’ is the variable in our dataset that represents state, and the term it is set equal to (in this case, ‘NH’) is the term in our dataset that represents our institution’s state. Note that we could have set state equal to ‘New Hampshire’ or a numerical code, as long as it matches the term that represents New Hampshire in our dataset. The equation outputs a variable that is equal to ‘1’ when state is NOT New Hampshire and ‘0’ otherwise, thus flagging records which are out-of-state.


The final step before naming and saving your out-of-state flag is to select “binary” from the “Result Type” list.








And, voila, it’s easy as that! You now have a quick way of identifying in-state vs. out-of-state students in your dataset; let the reporting begin!

PS: If you guys have any specific requests for a variable to be featured in the "Creating Variables" series, please leave them in the comments or email me directly!

-Caitlin Garrett, Statistical Analyst at Rapid Insight

No comments:

Post a Comment