Working with functions
Introduction
When you import a function, a new variable is created for each of the function's outputs, and each output becomes a new column in your data set. You can use these new variables just like you use any other variable in your data set. However, variables that were calculated by functions also have some special properties that let you customize how Rave handles them.
Modeled Variables
When you import a function, you are given the option to define a "modeled variable" for each variable that is calculated by the function. By default, Rave will list each function output as a "New Variable," meaning that the variable is
All independent variables
. However, if you are loading a function whose output(s) are new models of existing variables in your data set, you can instead define the outputs to be models of those existing variables by selecting the corresponding variable's name from the menu.
When you choose "New Variable," the variable you loaded is simply treated as being a model of itself. Otherwise, it is listed as being related to the specified existing variable in your data set.
Regardless of whether you choose the function outputs to be "New Variables" or models of existing variables, they will be added as new columns to your data set. In most cases they will behave exactly the same. Declaring an output to have a modeled variable simply lets Rave establish a link between these two columns of your data set
For example, suppose you have written several functions that all calculate "Gross Weight" of a vehicle, but each function makes this calculation using a different method. Your goal might be to compare the different models of Gross Weight to determine which is most suitable. When you load these functions, each will add a new column to your data set that contains its calculation of Gross Weight. If when you load these functions, you tell Rave that each
But telling Rave that all of these columns are models of the same physical quantity, Rave can make it easier for you to switch between models and compare them. Some graphs will also give you special options when you are working with variables that have multiple models.