 Good day. In the last session, we introduced the policies that are present in MOSMOD and distinguished the definitional policies and the tax and benefit policies. In this session, we're going to look at the tax and benefit policies in more detail. We're going to understand how they're constructed and in particular look at functions and parameters which are the components of policies. And then we're going to conclude the session by looking at how to run the model and access the output. First of all, it's important to distinguish between systems, policies and functions. So systems contain groups of policies. Polices are constructed from functions and it's the functions that form the calculations to create the model output. Now what's a system? I'll just switch to the model here and point out what a system is. A system is actually a group of policies and it's represented by a column in the model. The only system that's present in the version 1.0 of MOSMOD is the MZ underscore 2015 system which is the set of rules that are required to simulate these policies for the year 2015. Back to the presentation, we can show all of this diagrammatically because as I said in MOSMOD version 1.0 there is one system, that's the 2015 system that you can see there. And then there are policies and these are some examples. There's an income tax policy, direct social support program, basic social support program and indirect taxes including value added tax. And then we have functions and just for example the direct SSP contains eligibility tests and calculations to calculate amounts. Now functions are the building blocks of all policies in MOSMOD. Different combinations from the full set of functions allow the construction of almost any policy. And functions can be classified into three categories. Policy functions for implementing tax benefit policies. System functions for implementing the basic framework of the model. And there are also some special functions but we don't use these in MOSMOD. In fact in MOSMOD there are only 11 functions. There are three policy functions, Elig, BenCalc, Arithop and the remaining eight system functions of UpRate, DevVar, DevInput, DevIll, IlvarOp, DevTU, DevConst and DevOutput. And I'll be explaining all of these as we go through these sessions and I take people through the model itself. But basically so we have eight system functions and we have three policy functions. Each function consists of a header displaying the name of the function and a switch defining whether the function is activated or not. And then the function is divided into a series of parameters. Okay, what's a parameter? Many parameters appear within multiple functions and some on the other hand are specific to particular functions. Most of the policy functions and some of the system and special functions have common parameters. But some have parameters that relate only to a particular function. There are compulsory and optional parameters but for example the parameter tax underscore unit must be included in all policy functions. Otherwise MOSMOD will issue an error message. And MOSMOD is told how to calculate the policy by setting the parameters of the functions to appropriate values. Now I will be taking you through the model showing you this but I think in the first instance it's worth actually talking through and before we explore it on the model. And let's take first of all a policy function which is the function Elig. It's one of the three policy functions that we use in MOSMOD and I think it's really quite straightforward. Elig determines eligibility. It sets a variable, the output variable or a system variable to one if an individual is eligible or zero if they're not. Based on one or more conditions. Must contain the parameters Elig underscore cond which is the eligibility condition itself. And as I said just previously must contain the parameter tax unit because all policy functions must contain the tax unit function. Conditions may be quite simple like for example age greater than equal to 60. Dag greater than equal to 60. Dag being the variable for age. Or it can be used built in queries such as is this individual a dependent child or is this individual head of the tax unit. Each condition is enclosed by curly brackets and conditions may be combined with and and or. The and and or are specified using the stator symbols for and and or that is the ampersand and the vertical bar. Components can include variables, income lists, numeric amounts and footnotes. We'll come on to footnotes in due course as examples so I won't mention at the moment. And conditions can be assessed at different levels. And again don't want to confuse the issue at the moment by explaining levels though they are used within Mozmod. And I will talk about them when we go through the model itself. So let's look at an eligibility condition. I'm actually going to give you the example of the eligibility condition for simplified tax. And I'm going to actually use simplified tax to illustrate all of the policy functions because it's quite a straightforward policy. And so it's easy and straightforward to understand. So it contains, as I said, the function Elig for eligibility like all eligibility functions do. Sorry, it contains the function Eligibility because that's what we're talking about. And it has two parameters, EligCon as it has to as the eligibility function and tax unit. Okay, let me give you an example of eligibility. I'm going to scrap that. Okay, let me give you an example of the function Elig. This is the eligibility condition. And I'm going to use the eligibility condition for simplified tax. Not actually as it appears in the model, but to give you an illustration of how the function works. So first of all, we can see from the screenshot the function Elig. It just appears like that. Then there are two parameters in Elig. Remember, I said always there's an Elig underscore con function and always there's a tax unit function. And there they are, both there within the Elig function. And here are the switches. The policy itself has to be on and the Elig function has to be turned on. These are those green on's. And then the eligibility condition is really quite straightforward here. It's if basically the income list for simplified tax, if the taxable, simplified taxable income is less than or equal to 2.5 million metacals a year, then you're eligible for simplified tax. And that eligibility then sets a system variable which doesn't appear as one if that income list for simplified tax is less than 2.5 million. If it's less than or equal I should say to 2.5 million. If it's greater than 2.5 million it will set that system variable to zero. I can also give you another example by one of the eligibility conditions in direct social support programme. Here it is. And this is the eligibility of child-headed households. It's one of the eligibility conditions that's possible in direct SSP. And here we have the function Elig as before. We have this time actually four parameters in total. The Elig condition is something called the level which I mentioned it before, which is you could think of as a footnote. The output variable and the tax unit now and the switches that I mentioned. Just looking at that the eligible condition is is head of tax unit because we're trying to see whether it's a child-headed household and that has to be at the level of the household because we're trying to identify who's the head of that household. So that's what that level second parameter is about. So is head of tax unit hash one means go to the level one and that's household level and their age has to be greater than 11 and less than 18. And the output variable which will be one if that's true is named I underscore child underscore headed and the tax unit is individual because you're testing the individual but you're trying to test whether he or she is head of tax unit so the level for the is head of tax unit has to be at the household. I hope that's clear. Okay now I want to go to function are a thought. Now function are thoughts are simple calculator. It must contain the parameter formula and the compulsory parameter tax unit and the formula is just what it says it can include variables income lists, numeric amounts, queries and footnotes. The main operators are smooth brackets plus minus multiply or divide queries automatically calculate particular conditions easy number of children in household or carry out tests easy whether or not the person is married We saw a query in the function elige in terms of is head of tax unit but there are these other queries that could come within the calculator function of our thought footnotes are used for example for applying upper and lower limits to a functional variable or specifying a level and we've already illustrated the footnotes specifying a level when we looked at the level household in the elige function that we have just gone through. So let's look at the are a thought function and I'm sticking with this example of simplified tax as I say not as it's implemented actually in the policy but to give you a sense of how it works. Remember with simplified tax we've already looked at the function elige and the eligibility was that their turnover income was less than or equal to 2.5 million metacals a year and then the are a thought which follows it similarly has parameters and a simple algebraic formula in the formula compulsory parameters so for the simple formula is that you take the turnover the eligible turnover and multiply it by 0.03 that's because simplified tax is at 3% and then you that generates the output variable ttn underscore s so we have an elige followed by an are a thought and that's a very typical way of calculating a social benefit so often do you get the the eligibility test followed by an are a medical operation and here's what it would look like if you implemented simplified tax with those two functions putting the two functions out so what we've got here is the elige function which we discussed earlier that is the turnover for simplified taxes less than or equal to 2.5 million per annum and then the are a thought which we've just gone through that you take that turnover and multiply it by 0.03 and that generates the output variable ttn underscore s okay and that's a perfectly respectable and good way of implementing simplified tax nothing wrong with it however we do have another function and this is what we use within mozmod that's the function ben calc because ben calc combines the functionalities of elige and are a thought and it's particularly useful for benefits social benefits and it's often referred to as the benefit calculator hence ben calc but in this case it's a tax we're simulating and it's very good also for taxes because it combines elige and are a thought into one neat function and that's how we actually do implement a simplified tax in mozmod so the eligibility conditions comp underscore con and the formulae to calculate the value of the benefit assigned to eligible individuals or tax units is comp underscore per elige or comp underscore per tu depending on the circumstances the same rules for syntax suppliers for elige con in elige and formula in are a thought so comp con is equivalent to elige con in elige and comp per elige or comp per tu is the equivalent of formula in are a thought ben calc can have multiple conditions with different amounts being assigned to the different conditions so it's possible it's a very simple and straight forward ben calc we use for simplified tax but it is possible for it to be much more complex so the eligibility conditions and corresponding formulae are specified as separate parameters when you've got multiple conditions so here it is as it actually appears in mozmod the actual simplified tax but look at other policy functions so I'll shift to the model okay now let's just look at that simplified tax just as I showed you before contains the eligibility condition the comp con is the turnover remember that's what the income list for simplified tax is is the turnover less than or equal to 2.5 million and if it is then the formula comp per tu is applied that is the income list for simplified tax the turnover is multiplied by 0.03 which is 3% and the output variable ttn underscore s will contain the simulated turnover tax we also remember looked at the direct SSP before and that's quite a complicated social benefit actually with lots of different eligibility conditions I showed you the one the eligibility condition for childhood households so is the head of the household that's the household level, the hash one is the person ahead of the household yes, that's the household level and is the age greater than 11 and age less than 18 and if that's so then a one is placed in this variable i underscore child headed if it's not the case then a zero will be put into that and that condition will be not fulfilled there are similar other eligibility conditions eligibility condition that looks at disability there is a variable called ddi01 in the data set which is a variable for chronic and degenerative diseases and if that's set to one then the person has got a chronic or degenerative disease and the eligibility is set to one in this temporary variable i underscore bedridden that becomes one, etc and there are a number of those eligibility conditions as possible roots into getting direct SSP and then there are calculations like arithop this is a function where we calculate the household income using the income list dsa which is the income list of the relevant income required to calculate household income and the output variable is ymn01 underscore s that's simply a variable into which that income list is placed and the second of these arithops divides that total household income by the number of persons in the household n-person unit and puts out an output variable of the per capita income and then there's an eligibility criterion that follows that that looks at the per capita income but I will go through this in much more detail when I actually talk through the model I think you get the picture of how these policies are built up of functions and that the functions are built up of parameters and that's really the basic way in which MOSMOD works let's go back now to the presentation and look at running the micro simulation model so MOSMOD output is based on two inputs household micro data and the rules on how to calculate taxes and benefits stored in the content file using these two information sources the model calculates all taxes and benefits that have been implemented calculations are carried out for each individual and household in the data set and the result is written into an output file this output file is at the individual level and less specified otherwise and how do we run MOSMOD? well we actually click first of all on that button that says run in fact you're a mod at the moment but we're hoping to get that changed but run MOSMOD in the top left hand corner of the user interface and that activates the run dialog so once you press that you then get this and this has a list of systems which are ready to run so you select the system that you want in fact there's only one system in MOSMOD at the moment that's mz underscore 2015 you also pick the best data set there's only one data set in MOSMOD at the moment so there's not a list to choose from and that window at the bottom of that dialog specifies the output folder where you'll find the output and that is specified actually at the very beginning when you set up MOSMOD and it's usually in the folder output and then finally once the required selections have been made you click on the run button to start the simulation process and then you get another dialog this is the one in the top left here where it shows you what particular configuration of systems and data you've specified and as I said there's only one data and one system so that's clear there tells you the status of the run in the first dialog it's still running but in the second it's finished and then if you look at the second of those dialogs once it has finished it tells you the time it's taken and that will depend entirely on the speed of the computer and the size of the data set and the complexity of the policies there is a possibility that it might get an error log but in this case there aren't any errors but if the run is finished and there is an error log it will simply contain warnings but if there are fatal errors the run will be aborted so instead of finished in the status box it will say aborted okay, when MOSMODS finished its calculations the output is stored as one or more text files at the storage place defined in the field output path which is usually set when you launch the model the main text file is called for example MZ underscore 2015 underscore STD and that's defined in the output definitional policy which we mentioned in an earlier session that I can show you in a minute and that file contains variables defined in that policy you can quickly look at it here it is, output and you can see it actually outputs almost all variables because we can output groups of variables that begin with particular letters like for example the demographics D and then the asterisk means all variables that begin with D and there's the actual file specified in the first parameter of this particular function output files can be viewed in a text editor program or imported into any statistical analysis package for example STATA for more detailed analysis the model also produces a header file relating to the output file and error logs relating to the output file are also stored as text files should you be unlucky enough to generate errors okay, the activity associated with this particular set of slides is actually exploring the policies together there will be a further video in this series where we do explore all these policies in particular looking in detail at these functions Elig, Arithop, BenCalc and then run the model to examine the output but however I'll leave it there, thank you