 Okay, we've had a number of sessions where we have gone through different aspects of the model, and I've interactively shown you the model as we've gone along, specifically to examine the different policies and functions, and most recently to take you through the ways of modifying an existing policy or adding a new policy. I'm now actually going to put it all together and walk you through the entire model. Sometimes I'll just give examples of, say, an income list or a tax unit, or indeed even a Ben Kalk within a policy. Sometimes I'll take you through a whole policy just to give a sense of the overall model. Okay, before I do anything, I'm going to park the 2012 system. Remember, we can move any selected system to the hidden systems box, which are done, and then close that, and that gives us simply the 2015 system, which we can move across to fully get a good view of the whole system. Before I start with the systems, however, can I just remind you of the tabs that are useful? Display tab, we don't use, but I did mention conditional formatting. I think in the last session when I talked about being able to highlight changes, but that's really the main display parameter that we sometimes use. Otherwise, these are ways of looking at single policies, showing the hidden systems boxes, etc., but usually we use the defaults. In terms of the country tools, I've mentioned the add system, delete system. I will remind you of uprating indices, which is something else that we use, and of course, databases is another important part of the country tools, which, again, for our particular data is not so interesting because the only database is the HBS. But that's which of the country tools are commonly used. If we look at administration tools, the most important there, I think, for us, is the variables administration tool. The add country, delete country, import country, etc., are much less important. But the variables, remember, from the last session, is where you add a variable in EuroMod format. If you need to introduce a new variable, either because you've created a new variable within the underlying dataset, or because you've introduced in a policy reform a new variable. Remember, new variables have to be in the format of the EuroMod format with the acronyms created. I'll open this so that we can be reminded of it. The acronyms created in the correct way, so that assets variables begin with A, benefit variables with B, tax variables with T, etc., etc., demographic with D, labour market with L. Here are the top level acronyms here, demographic D, labour market L, benefit pensions, B or P, income Y, tax T, assets A, expenditure X, in kind, beginning with K, and system with S. If you're introducing a new variable in your input dataset, as I say, or within the model itself, you have to make sure that it's in this list, or you need to create it using these acronyms, and you can create levels of acronyms using the acronym tab. You can, of course, and we have done within the model, introduce variables in the model by using the def var function, and I'll illustrate those when we go through the model. The def var, for example, we use extensively within TASmod to introduce intermediate variables, and we also use it for expenditure variables, because it's a different way of introducing variables to the model, and is particularly useful, as I say, for intermediate and expenditure variables. But otherwise, this variable's administration tool is vital. And the add-ons, these are yet not available for south models, special add-ons being developed for south models to enable straightforward calculations of both the numbers of beneficiaries and amounts relating to different benefits and taxes, but also to allow us to calculate poverty and inequality in straightforward and easy ways. Then the applications, I've told you that we use the Excel application often in order to check the outputs and doing what it says. I mentioned the summary statistics. There's another thing that the tool will be specifically helpful for, and then help and information, there's a help file and a version number, a version just simply gives us information as to which version of the executable we're using, and the help helps on understanding functions, parameters, etc. Though I have to say also with the TASmod training, there will be a training manual and that will specifically go into, in more detail, the functions and parameters used within TASmod. Okay, so let's press the country tool and go back to going through the model itself. Again, up-rate, remember this was when we did the session on definitional policies, we talked about operating. I showed you that within the country tool, we create an operating index that in the case of Tanzania is the overall CPI or various components of the CPI. Okay, and the CPI we've been using in TASmod is the one that was recently updated with a base at December 2015. I'll close that. But just to remind you, you declare the data set and then the default factor, which is the overall CPI, and then because we don't have any earnings factors, we use the overall factor for both YEM, Employment Income, and YSE, which is Self-Employment Income. Okay, now I didn't go through the expenditure and the expenditure excise policies when I took people through the definitional policies simply because it's slightly more complex, but I will briefly mention it now. So there's two, there's expenditure and expenditure excise. Expenditure is how we bring in the variables into TASmod that are used specifically for calculation of VAT. And we wanted to bring in the variables in as disaggregated a way as possible to enable all kinds of variations to VAT to be simulated in policy reforms should that be required. And if I can just show you the general structure of the expenditure, underscore TZ policy, you first of all define the variables that you want to bring in. This is so as you don't need to use the variables tool that I mentioned before, there's a way of bringing them in and defining the variables as a separate file. The reason that you don't use the variables tool is that there are 700 plus variables of expenditure items in TASmod that we want to bring in. And it's really time consuming to bring them in through the traditional variables route. So if I can just show you the def bar, we list all of the variables. And these variables are constructed in the form extra expenditure and then the koi-kop code. And you can see rice, paddy, bread, flatbread, etc. They're all brought in. There's a zero when they're initialised. And I think I'm right in thinking there were 700 plus. We can go right the way down and we will see how many there were brought in. And it's 781, okay? I'll take it up and then compact it, but compress it. But you can see that we brought in 781 variables through this file. So that's def bar to initialise those variables. Then the def input gives you the path of the input file that you're bringing in. Because we bring in a special file with just expenditure variables. So that file is put in the same folder as the more general input dataset. So it's in the TASmod version 1.0 slash input folder. So we state that there. We then state the name of that file, which in this case is TZ underscore 2012 underscore expenditure dot TST. And then the merge variable. And it's merged at the level of ID person. That's because though expenditure is a household level expenditure, we in the preparation of the syntax have allocated that household expenditure to the head of household. And so in a household, there's only one entry of expenditure and that's alongside the head of household. And then that's brought in as that expenditure against the head of household, but other members of the household just have a zero against them. But you therefore want to merge the, or you want TASmod to merge in that data against the head of household. Next thing to do is to define an income list and a way of uprating that income list. Because it's quite important with expenditure items if we can, because given this dataset is 2012, to uprate in as sophisticated a way as possible. And for TASmod, we've taken the decision to divide the expenditure variables into food and non-food and uprate the food by the food CPI and the non-food by the non-food CPI. We treat excise-dutyable items separately and try to be a little bit more sophisticated with them. So the income list for the food items, for convenience we've copied all of them into this list, the whole 781, but we put a plus against the food items. And against the non-food items we've put a not applicable. The reason we've done it this way is because it's relatively easy to cut and paste within the model. So we can actually cut and paste all of the variables, expenditure variables, both food and non-food, and then put a plus against the ones that should be added together to form the food income list and are not applicable against all of the items that are in the non-food income list in this particular case. So that's the food items. Then if we look at the next income list, exactly the same, but where we've got a plus is now not applicable. Where we've got a not applicable is now a plus. So that's now collapsed that. So basically we've defined two income lists, food expenditure variables and non-food expenditure variables. And those two income lists then get uprated, not under the up-rate policy, but separately uprated. And here we are. This is how we up-rate. The first income list, you'll remember the food. We gave the name of eel underscore exp underscore up-rate zero one. And the other one we gave up-rate zero two. But in order to up-rate we use the eel var op function. And eel var op means that the function performs a mathematical operation on an income list. So the income list in question is the up-rate zero one, i.e. the food. So that's the income list to be operated on. The operand, this is the up-rating index. So we want to take the income list up-rate zero one. And we want to do something to it involving the up-rating index for food. And what we want to do is use the operation multiply. So M-U-L multiply. We want to multiply the food income list by the CPI for food. And then the second one is to do the same with the non-food, which is zero two, and again multiply. And that indexes our expenditure. Okay, the excise duty is very similar. We define the variables for the excise duty in the same way. The only thing that's different with the excise duty for items is that for some of the excise duties, mainly actually, they're actually calculated on quantities. So we need a quantity variable brought in. So we define some Q variables. So Q zero two one one one zero zero, which is the spirits is brought in as quantity. So that's row three point one point one here in litres. We also have the expenditure brought in here, if I'm not mistaken, as X zero two triple one double zero. So again, we're using the Coycott codes for spirits and indeed for the other items to bring them in in this nuanced way. Again, sorry to carry on with that collapse there. We define the input. It's a different file, but it's in the same path again merged in the same way. We define the income list. This time, because we're only operating the expenditure, we're not operating the quantities. We produce income lists for the spirits and alcohol as one. The tobacco products is another and the fuel expenditure is another. So we've got three income lists that we're going to operate on. And we operate on them to operate them in using the CPI for alcohol for the alcoholic beverages income list. Tobacco for the tobacco income list and fuel for the fuel ones. Now they're really quite approximate these particular uprating factors because the CPI isn't that nuanced, but we have done the best we can, I think, given the breakdown of the CPI provided by the Statistics Bureau. So I'll collapse that whole policy. That takes us down to income lists more generally. I began to introduce income lists anyway because they were in the policy above, but there's an income list definitional policy. I talked about these in some detail and showed you some of these when we looked in Session 2 specifically at the definitional policies. So I just show an income list for other income other than YEM for the income tax policy. So the other income list contains other income, income from property, income from land and agricultural income. Similarly there's an original income which contains income from employment, other income income from property, income from land, income from self-employment, agricultural income and it includes even income from private transfers which aren't included in the income list for tax because they're not taxable. Okay so that gives you a flavour of income lists. I took you through some of the others I know when we did the income list definitional policy. But the one other I'd like to single out is the income list for standard rated VAT items. Because this is, again, rather like the income list before of all the expenditure items on which VAT is likely to be appropriate but we want standard VAT items. So in this we make not applicable those items of food for example which are zero rated for VAT which are things like rice and paddy but include ones that aren't. So basically the Tanzanian policy as you know is that in a sense the raw materials, the food raw materials are zero rated but the derived processed food tends to be standard rated. Okay so that's the income lists. That takes us to the tax unit definitions. Again I explained when we did tax units that there are really only three tax units that are applied here. There's a household which has a dependent child definition of less than or equal to 17 and greater than equal to zero. But all members of the household belong to the household unit. The family isn't actually, it's a subgroup of household but not used. The others that are used are individual and couple. Okay so we switch off the family because it isn't used. Okay constant definition. Well we've used this considerably in the exercises as well. A lot of the constants are put into the constant definition. These are the items like the monthly amounts of four different variable conditional cash transfer beneficiaries and the caps and so forth which we'll go through a bit when we look at those policies. And there's also the excise duty rates and VAT rate etc. What we haven't done and partly because we wanted to leave some work in for these exercises but partly because it hasn't just proved enough time to do it all is put everything into constants that could be put into constants. And one of the things as you go through this you'll see that there are other things that could have been put into constants that we haven't yet done. And indeed the exercise is for the last presentation involved putting into constants some of the parameters that aren't currently in constants. Okay so it's not it's not obligation to use the constant definition it's just easier really. Okay let me then take you through these other two policies and there's a pair of them really. I'll open them both out and then we can look at them. These are the policies that relate to employees in the formal sector and it's the National Health Insurance Fund and it's basically both the employee and the employer contribution. Both are at 3% it's mandatory for the public sector. It's not mandatory for all sectors but it's common in the formal sector generally. So we have implemented it for both employee and employer for people who have employment income that says they have YEM that's greater than zero and the LFO equals one. The LFO is a labour market variable which means labour formal. So and labour formal equals one if the occupations are in certain groupings like the employer is public sector or the employer is government sorry that's the same thing government and public sector but also private industry and so forth. Formal sector employees are given a flag of one in the original data set so we can make the condition that YEM is greater than naught and LFO equals one for being simulating this particular contribution. And this is simulated at 3% for both employer and employee so a total of 6% and the employee one goes into the variable T-S-C-E-E-H-L and the employer one goes into T-S-C-E-R-H-L and this is actually simulated quite well within the model slightly greater amount I think simulated than actually is collected but it's pretty good. Okay that takes us into the taxes or at least the direct taxes the indirect taxes are at the bottom here but the direct taxes are really two groups or two there's the presumptive income tax which is a turnover tax which as I said when we went through this particular policy I think in the second session or maybe no sorry the third session is a turnover tax for people who are really traders mainly in the informal sector with a turnover of less than 20 million Tanzanian shillings a year who aren't in employment informal employment and don't have any YEM or not in agriculture don't have any YAG and don't keep accounts it's payable at a lower rate than income tax because it's paid on turnover so let's just have a look at it the eligibility condition is that they have to have a turnover of greater than zero and that the turnover is less than the presumptive upper limit which I think I mentioned was 20 million and they don't have any formal employment income and they don't have any agricultural income but when you actually hover by the way on the constant it actually spells out what the constant is and as you can see in the small box there it tells you it's 20 million so I was right then that amount of turnover in those circumstances so using a tax base of YTN but only if you pass the eligibility test you move on to the calculation schedule where you're actually then taxed your total turnover is taxed depending on which bands it falls into so up to four million and one you don't pay any turnover tax and then up to seven and a half million it's at three percent between seven and a half million and eleven and a half million it's 3.75 percent eleven and a half to 16, 4.5 percent and then between 16 and 20 it's 5.25 and then the output variable is the turnover tax I think that should be pretty clear income tax a bit more complicated a bit more complicated because there's people on PAYE and there's also people from self-employment and indeed from agriculture and who have other income who are also considered in this policy so first of all there are some intermediate variables we calculate and they're defined as using the def bar function as I underscore PAYE and I underscore accounts and you'll be familiar now with the way that they are defined so it's PAYE income, EM that is for those informal sector actually and then self-employed income accounts cases i.e. not the people who are captured in the turnover tax so that's again why that TIN policy has to be after the turnover tax and then there's a couple of bencalcs an arithop and a shed calc which comprise the policy so the first bencalc is just to capture the yam of those people who are in the formal sector so the condition is that they're in the formal sector LFO equals 1 what is captured is eel taxably now eel taxably I will just show you it is actually just yam minus the NHII contribution so let me just find it here it is so it's yam minus so that's plus adding yam but minusing the NHIF employee contribution because tax is only payable on the net employment income after deduction of NHIF also deducted is pension contributions but we haven't yet modelled pension contributions when they are that will be added into that income list so let's go now back to the bencalc so I underscore PAYE is IEL underscore taxably for the persons in the formal sector so in other words it's yam minus the NHIF contribution so bear that in mind that's one source of income the other is if someone is in self-employment or and they're either their turnovers higher than the upper limit of presumptive tax or they have yam and the YSE is greater than naught or they have YAG i.e. agricultural income and the YSE is greater than naught because remember for presumptive tax not only do you have to have your turnover less than the upper limit you also have not to be in either employment or agriculture so this captures the people who have self-employment income who are either over the turnover limit or they have yam or they have YAG YSE is different than turnover YSE within the data set and calculated as net profit and these people one refers to as accounts cases so they are that's the eligibility condition that's the amount that's brought in YSE it has to have a lower limit of zero and the reason that that's the case is because the way that the HBS asks about the data there are some people whose costs of production if I can put it that way exceed the income that they've brought in so they have a negative profit and in those cases they're just a zeroed otherwise they can complicate the tax calculation in a way that's not necessarily reflective of their actual profits over a year and that's simply because the costs of production are only asked for over the last one month and it could just have been an expensive month that's something we're hoping that HBS will address in future versions so we've got I underscore PAYE and I underscore accounts as two output variables one reflecting PAYE income the other reflecting accounts income but of course we also have other income like the income from land and so forth that's contained in the income list you'll remember IL underscore taxably two so if we add up using a simple calculator I underscore PAYE plus I underscore accounts plus IL underscore taxably two we get the total tax base which is in the output variable TTB underscore S and that is then what enters into the shed calc where that tax is then taxed using the thresholds indicated here and the rates indicated so with the first annual now I can have quite calculated the numbers of zeros on these but I think the first two million of income at a zero rate of tax and then going up to a maximum of 30% tax and then the output variable is TIN underscore S I'm going to close all those up now so that's the income tax the next thing to talk about is the productive social safety net benefits first of all the fixed basic cash transfer which is fairly straightforward or is in the way that we've implemented it now the TASAF implement the PSSN benefits in quite a complex way which involves a proxy means test is worth saying here and it's all elaborated in the country report which I encourage you to read but basically the proxy means test aspect of the calculation uses is derived from the HBS itself by looking at the food poverty cases those households below the food poverty line in the HBS and then constructing a regression which looks at a combination of assets and attributes if I can put them that way which predict a household to be in food poverty we don't need to do that because we have the HBS and we have the food poverty line so we're able to categorically say whether a particular household is below the food poverty line or not we don't have to speculate or use a proxy means test to achieve it because we have if you want a dependent variable which was used in order to construct the proxy means test in the first place what we don't have is the series of community level screenings that are employed by TASAF before a household is awarded either the basic cash transfer or the variable conditional cash transfer so we can only implement the rule based part of this okay so let me show you how that's done first of all we have an intermediate variable which we call BSA underscore individual which is the individual BSA amount the next thing we do is that we have a two level you remember when I talked about bankouts I talked about them as being possibly quite complex I introduced a simple one level one with a comp con and a comp tax unit that's the eligibility condition that's the amount payable but this one has got two conditions which ends up with an output variable of the amount payable at individual level inserted into this temporary variable or intermediate variable I underscore BSA underscore individual so the first condition is as I said food poverty equals one that means that the household is in food poverty and actually that food poverty indicator is given to each individual in the household so everyone who is in a food poor household will have a one against their DFP variable so DFP equals one and the age is greater than equal to naught and less than equal to seventeen so the infants and children are captured and allocated this here which is two thousand you can just see in the little box two thousand a month at the individual level and then the second condition is for those greater than eighteen i.e. the adults and they're given five thousand a month and then the result is put into the intermediate variable and then the amounts allocated to the different individuals are then added up and allocated at the household level so here we have bringing in the condition that the i underscore BSA underscore individual is greater than naught so they've got to have something allocated at this level and the amount brought in is this for each individual level but it's calculated at household level and they're added up what this function effectively does is adds up all the individuals who have been awarded i underscore BSA underscore individual and assigns them to the head of household using that variable because the tax unit is household here I hope that's clear okay so that's the fixed basic cash transfer then I think we need to move on to the more complex a variable conditional cash transfer before we don't go any further there is a number of different intermediate variables declared here defined at the beginning they're all i underscore something and it's first of all the i BSA HH with ch as the households in receipt of BSA and containing one or more children is the first one children under seven are assigned their BSA amount there is a cap for the children under seven seven to thirteen are assigned their BSA amount but there's a cap for the seven to thirteen and finally the fourteen to seventeen so this will be clear when we look at the eligibility conditions relating to children I should say this B-chot the variable conditional cash transfer is in addition to the BSA but only where there are children so it's specifically for children so BSA underscore S is going to be greater than zero and the number of dependent children in tax unit have got to be greater than zero and the output variable becomes in a sense a flag which is that the household is in receipt of BSA and contains one or more children and then there's a Ben calc whereby the first of all the test is are you one of these i.e. household in receipt of BSA containing one or more children if yes and you've got your age is greater than zero and your age is less than or equal to six you get the amount four thousand and that goes into the temporary variable for children under seven to be assigned their variable cash transfer amount I suppose strictly we should have called this the variable cash transfer amount here and not BSA in this particular policy and that's just a matter of the comments being not as accurate as they could be but there's a cap so at household level there can be no more than four thousand paid out so basically you can only get this amount as a household for one child under six if you've got more than one child under six it's capped at four thousand so we bring in the fact that there's an output variable for children under seven assigned their amount but then the upper limit is the cap which is for the household so you add up them all in the household but you cap it at four thousand and as the individual child under seven is awarded four thousand that means that only one child under seven is included in the calculation at household level it's a bit different for the if I can just close up those two but expose the children who are greater than equal to seven and less than equal to thirteen because here they become awarded one thousand but the cap is four thousand so you can have four children seven to thirteen before you're capped and you're then capped at four thousand Ditto the last close enough see where I've got to I think we're at the fourteen to seventeen yeah the last okay I'll open those two up here with fourteen to seventeen the amount is two thousand and the cap is six thousand so you can have three up to three children age greater than equal to fourteen and less than equal to seventeen and then finally the Ben Kalk adds up all of the amount which is the capped amount and allocates it to the head of household right but also you'll remember from the earlier presentations and indeed the exercises that you can't have as a household more than nineteen thousand a month of both basic conditional transfer and the variable conditional cash transfer so here we have this BSA B-chot one that we worked on earlier where the condition is energy-ability condition is you've got to have either BSA or B-chot in fact if you've got BSA sorry if you've got B-chot you will have BSA but you could have BSA without B-chot but the total amount at household level which is the tax unit level is the BSA plus the B-chot and if that's greater than nineteen thousand it's capped at nineteen thousand and whatever it is is output to BSA double zero underscore S as we talked about earlier okay the final benefit is the eligibility for public works for the eligibility for public works what I have I've shown you this earlier as an example of something with just an elige without an arithop because we all we generate a flag as to whether someone's eligible and basically if you've got your fixed basic cash transfer then the head of the tax unit is eligible and this eligibility flag goes into BUN underscore S and now for this level of the training I'm not going to go into indirect taxes they are actually much more complex and though I've talked about how you import the variables for them I'm not at this stage going to go into the indirect taxes we can do that as kind of more advanced training I think I did actually talk about the output though and we have outputted almost all the variables both from the input data set and the simulated data set because we have outputted all these variable groups and we've also outputted income list groups what we haven't done deliberately is output the expenditure variables simply because there are 781 of them as you know and that would cause a havoc in the output file it would make a very big output file and would obscure things but we have of course output though we haven't gone through it the amount of excise duty and the amount of VAT and of course the income list which is the composite of all the expenditure but not the individual items ok now collapse everything by the collapse all policies and I think that's the end of this thank you