Change Selected Functions: Difference between revisions

From Pardee Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
=== <span style="font-size:medium;">Overview</span> ===
Variables are forecast based on mathematic relationships that are represented by functions within IFs. These functions can be changed based on different understandings of relationships between variables. Change the relationships between&nbsp;two variables&nbsp;or&nbsp;multiple variables using the ''Bivariate'' and ''Multivariate function'' pages.


Variables are forecast based on mathematic relationships that are represented by functions within IFs. These functions can be changed by users based on different understandings of relationships between variables. Users of IFs can change relationships between&nbsp;two variables&nbsp;or&nbsp;multiple variables. Follow the links below to learn more about how to change these relationships.
= <span style="font-size:xx-large;">Bivariate Functions</span> =


= <span style="font-size:xx-large;">Bivariate Function Changes</span> =
To open the ''Bivariate Function'' page form the Main Menu of IFs: choose '''Scenario''', '''Change Selected Functions''', and click '''''Bivariate Function.''''' Once on the ''Bivariate Function'' page search for a particular function in the '''Filter Functions (press enter)''' field or scroll through the '''Function (click to see/edit)''' dropdown in order to view a relationship that is already in IFs. Use the filter options ('''Used in Run''', '''Used in Historical Run''' etc.) to the write of the dropdown to filter for functions that are used for particular model tasks, or not used at all.
[[File:Example of Bivariate Function page.png|center|thumb|950x950px|An example of the Bivariate Function page used to change functions in IFs.]]
When a function is clicked the relationship of the function will be shown in graph form at the bottom of the screen. Depending on the type of function an R-squared and standard error of the relationship may also be shown below the graph. Export the graph by clicking on the the three lines in the upper right corner of the graph, then select the desired format to export.


Begin at the Main Menu of IFs. Choose the Change Selected Functions option under Scenario Analysis. Then choose the Change option and the Change Selected Bivariate Function sub-option. That will give you the Change Bivariate Functions window, below.
Once a chosen function is desired to be changed, use the '''Table Functions Points''' frame option or the '''Analytic Function''' button option to specify a new relationship.  


[[File:Bi1.gif|frame|right|Changing Bivariate Functions]]
'''Table Functions Points''': A table function relationship is based upon lines that connect given points. In the Table '''Function Points''' frame, there are boxes for specifying the X-axis and Y-axis values. Specify a desired point by entering the X and Y axis values then click '''Add'''. Add as many points as desired, and click '''Previous''' and '''Next''' to move between already created points. Click '''Delete''' to remove a point from the graph. When the points desired to create a function with are all added click '''Alter''' to alter the function to now be based on this new relationship.


To see the full list of functions or relationships that you can change in IFs, check Extend List. Click on any of the relationships in the Functions list box in order to see the relationship already in IFs.
'''Analytic Function''': Click to open the ''Specify Analytic Function'' page. Use this page to change the mathematical formula of a function, by adjusting its function terms. A function based on a linear regression will only have a and b1 terms, and altering other bs will change the whole function type. More complex functions will use different b terms for example a exponential will use b2 and logarithmic b4.
[[File:Example of the Specify Analytic Function page.png|center|thumb|950x950px|An example of the Specify Analytic Function page, for GDP and car sales.]]
Change the '''Display Figure from X Value''' and '''To X Value''' fields to change the graph in the ''Bivariate Functions'' screen. Once the function is changed as desired click '''Save and Continue''' to save and return to the ''Bivariate Functions'' page or '''Exit -  Abandon Changes''' to return without saving the change.


There are two ways to specify relationships in IFs. The first is called a "table function." Table functions allow you to specify two or more points in a relationship and let IFs connect those points with lines to create the relationship. This is very simple because you need not understand equations. The second is via "analytic functions" or equations. Look at each in turn.
Use the '''Reverse Changes''' to return to the default for the selected function, '''Help''' to open the corresponding page in the [[Main Page|Pardee Wiki]], and '''Exit''' to return to the ''Main Menu''. After clicking '''Exit''' IFs gives a very important informational warning, on how any function changes will ractive only until you exit from IFs. Starting IFs again resets all functions to standard values. Moreover, although runs of the model that you make with altered functions will reflect the changes in functions, no information about the changed functions is saved with the .RUN files. Keep track of the changes somewhere for replicability.  


Option A for Specifying Relationships: Table Functions. Click on the "Play around with this" relationship so that you can do just that. In the Table Function Points frame, you see boxes for specifying new or changing old X-axis and Y-axis values. Let’s start by adding a point to the five that already make up the table function. Specify 7 as the X-axis value and 8 as the Y-axis value. Touch the Add button and the point will be added, creating a relationship between X and Y that increases to a point and then starts down. Try specifying 1 as the X-axis value and 8 as the Y-axis value, then touching the Alter button. Now you have a relationship that starts downward, climbs, and then drops. Table functions give you nearly unlimited control over the form of a relationship. You can always touch Reverse Changes to return to the original form. As it says, play around.
Now run the model and create a new working file that reflects the changed functions and their impact on all computations in IFs. Compare this run file (or a saved version of it) with the base case or with other scenarios.


Option B for Specifying Relationships: Analytic Functions (Equations). Click again on the "play around with this" relationship. This time, however, touch the Analytic Function button to call up the following screen.
= <span style="font-size:xx-large;">Multivariate Functions</span> =


[[File:Bi2.gif|frame|right|Analytic Functions (Equations)]]
Begin at the Main Menu of IFs. Choose . Then choose '''Scenario''', '''Change Selected Functions''', and click '''''Bivariate Function.''''' This page displays a table with multivariate function names, their a intercept, r-square, and standard errors. Search for a particular function using the search bar or scroll through the table to find the desired function. Use the filter options ('''Used in Run''', '''Used in Historical Run''' etc.) to the write of the table to filter for functions that are used for particular model tasks, or not used at all.


If you do not understand equations, you may want to skip this part of the lesson - table functions can serve you well.
Click on any a intercept to change the intercept term or on any function name to alter the other terms used in the function.
 
[[File:Example of Change Multivariate Function Sreen.png|center|thumb|950x950px|An example of the Change Multivariate Function screen for Bilateral Aid Exports.]]
But you can create a simple analytical function by specifying the constant (a) as 20 and the logarithmic parameter (b4) as 3. Leave the other parameters at 0. Note that by selectively specifying various parameters you can create a wide variety of analytic functions (including most of those that Excel will create when you fit lines to scatter plots). You may also specify the lower and upper range over which you will allow the independent variable to vary. For instance, you may not want the independent variable to be negative.
Click on the desired b coefficient to change the value for that coefficient. The b coefficients are based upon the standard function shown above the table, for example b4 is for logarithmic functions. Once clicked enter in the desired value then click '''Continue''' to save that term and repeat for each coefficient term desired to change. Then click '''Continue''' to save and update the function.  
 
Save and Continue returns you to the Change Functions window and displays the analytic form you have specified. Note that the function you have created looks much like the one that Excel fit to the relationship between GDP per capita and life expectancy in Lesson 4. You now have the capability of discovering relationships and good analytic representations of them using Excel on the country-specific data base in IFs and then taking those relationships into IFs itself.
 
When you Exit from the Change Functions window, IFs gives you a very important informational warning. If you have made any changes to functions, those will remain active only until you exit from IFs. Starting IFs again resets all functions to standard values. Moreover, although runs of the model that you make with altered functions will reflect your changes, no information about the changed functions is saved with the .RUN files. You must keep track of the changes you make in functions.
 
After you have changed one or more functions, you can run the model and create a new working file that reflects the changed functions and their impact on all computations in IFs. You can compare that working file (or a saved version of it) with the base case or with other scenarios.
 
= <span style="font-size:xx-large;">Multivariate Changes</span> =
 
Begin at the Main Menu of IFs. Choose the Self-Managed Scenario Analysis option under Scenario Analysis. Then choose the Change option and the Change Selected Multivariate Function sub-option. That will give you the Change Multivariate Functions window, below.
 
[[File:Multi.gif|frame|right|Changing Multivariate Functions]]
 
The form has two grids. The top grid shows a list of all multivariate functions in the model. The bottom grid shows the independent variables and parameters in a particular function, whichever function is high-lighted in the top grid.
 
*'''Intercepts:'''&nbsp;Change the intercept value for the function by double-clicking on the value in the intercept cell of the function of interest in the top grid.
*'''Other Parameters:'''&nbsp;Change parameters associated with specific independent variables for a selected function by clicking on the appropriate cell and changing values as desired. The general function at the top of the form explains the meaning of each possible parameter for independent variables. Normally, of course, most parameters will be zero (or null which means 0).
 
This feature of the model is in early stages of development. Some functions listed are not actually used in the model. Those for State Failure are used and changes in functional form will affect model behavior.


Changing functions gives you a powerful tool for using IFs to investigate possible futures. To an extent, it allows you to change the model itself.
Changing functions gives you a powerful tool for using IFs to investigate possible futures. To an extent, it allows you to change the model itself.

Revision as of 13:22, 5 August 2025

Variables are forecast based on mathematic relationships that are represented by functions within IFs. These functions can be changed based on different understandings of relationships between variables. Change the relationships between two variables or multiple variables using the Bivariate and Multivariate function pages.

Bivariate Functions

To open the Bivariate Function page form the Main Menu of IFs: choose Scenario, Change Selected Functions, and click Bivariate Function. Once on the Bivariate Function page search for a particular function in the Filter Functions (press enter) field or scroll through the Function (click to see/edit) dropdown in order to view a relationship that is already in IFs. Use the filter options (Used in Run, Used in Historical Run etc.) to the write of the dropdown to filter for functions that are used for particular model tasks, or not used at all.

An example of the Bivariate Function page used to change functions in IFs.

When a function is clicked the relationship of the function will be shown in graph form at the bottom of the screen. Depending on the type of function an R-squared and standard error of the relationship may also be shown below the graph. Export the graph by clicking on the the three lines in the upper right corner of the graph, then select the desired format to export.

Once a chosen function is desired to be changed, use the Table Functions Points frame option or the Analytic Function button option to specify a new relationship.

Table Functions Points: A table function relationship is based upon lines that connect given points. In the Table Function Points frame, there are boxes for specifying the X-axis and Y-axis values. Specify a desired point by entering the X and Y axis values then click Add. Add as many points as desired, and click Previous and Next to move between already created points. Click Delete to remove a point from the graph. When the points desired to create a function with are all added click Alter to alter the function to now be based on this new relationship.

Analytic Function: Click to open the Specify Analytic Function page. Use this page to change the mathematical formula of a function, by adjusting its function terms. A function based on a linear regression will only have a and b1 terms, and altering other bs will change the whole function type. More complex functions will use different b terms for example a exponential will use b2 and logarithmic b4.

An example of the Specify Analytic Function page, for GDP and car sales.

Change the Display Figure from X Value and To X Value fields to change the graph in the Bivariate Functions screen. Once the function is changed as desired click Save and Continue to save and return to the Bivariate Functions page or Exit - Abandon Changes to return without saving the change.

Use the Reverse Changes to return to the default for the selected function, Help to open the corresponding page in the Pardee Wiki, and Exit to return to the Main Menu. After clicking Exit IFs gives a very important informational warning, on how any function changes will ractive only until you exit from IFs. Starting IFs again resets all functions to standard values. Moreover, although runs of the model that you make with altered functions will reflect the changes in functions, no information about the changed functions is saved with the .RUN files. Keep track of the changes somewhere for replicability.

Now run the model and create a new working file that reflects the changed functions and their impact on all computations in IFs. Compare this run file (or a saved version of it) with the base case or with other scenarios.

Multivariate Functions

Begin at the Main Menu of IFs. Choose . Then choose Scenario, Change Selected Functions, and click Bivariate Function. This page displays a table with multivariate function names, their a intercept, r-square, and standard errors. Search for a particular function using the search bar or scroll through the table to find the desired function. Use the filter options (Used in Run, Used in Historical Run etc.) to the write of the table to filter for functions that are used for particular model tasks, or not used at all.

Click on any a intercept to change the intercept term or on any function name to alter the other terms used in the function.

An example of the Change Multivariate Function screen for Bilateral Aid Exports.

Click on the desired b coefficient to change the value for that coefficient. The b coefficients are based upon the standard function shown above the table, for example b4 is for logarithmic functions. Once clicked enter in the desired value then click Continue to save that term and repeat for each coefficient term desired to change. Then click Continue to save and update the function.

Changing functions gives you a powerful tool for using IFs to investigate possible futures. To an extent, it allows you to change the model itself.