Format
Tax Lab
Data experiments, methodological notes, prototypes and open research questions: reproducible, and clearly marked as experimental.
The 18 entries below are analytical models, simulators and scoring engines covering Uganda's fiscal position, compliance risk, cross-border tax, illicit financial flows and specific policy instruments. 14 began as R/Shiny prototypes built outside this site and were rebuilt here; 4 were built on this site from the start. None has been reviewed by URA or any government body. Each is catalogued by its method and, just as importantly, by where its numbers actually come from.
Macro-fiscal & revenue mobilisation
How much revenue the structure of the economy implies Uganda should be collecting, and what would happen to the deficit and the debt path under different shocks.
Method
Stochastic Frontier Analysis, Battese-Coelli (1995) inefficiency-effects specification, estimated across a 40-country African panel.
What it does
Estimates a revenue 'frontier' from GDP per capita, trade openness, agriculture share and financial depth, then attributes the gap between Uganda's actual tax take and that frontier to three causes: policy design, compliance/enforcement, and structural/sectoral factors. Simulates revenue gains from closing each gap toward the African or EAC regional median.
Designed to run on
ICTD Government Revenue Dataset, IMF WEO (via the imfr package), World Bank WDI.
What the repo actually ships
The 40-country African panel the Stochastic Frontier model needs isn't shipped here. This site's own full page instead shows Uganda's real tax-to-GDP trajectory by tax head (URA Data Book / UBOS), with the three-channel gap decomposition kept as a clearly separate, illustrative layer.
Key assumption to hold in mind
The decomposition is proportional to the model's delta coefficients; interaction effects between the three gaps are not separately reported.
References
Battese & Coelli (1995), Empirical Economics 20(2); Fenochietto & Pessino (2013), IMF WP/13/244; Medina & Schneider (2018), IMF WP/18/17; ICTD Government Revenue Dataset.
Method
Monte Carlo simulation, 10,000 stochastic trajectories under four categories of macroeconomic shock.
What it does
Projects the deficit forward under combinations of commodity-price, exchange-rate, growth and interest-rate shocks calibrated from 25 years of Uganda's own fiscal history, producing a distribution of outcomes rather than a single forecast.
Designed to run on
MoFPED Budget Speeches, IMF Uganda Article IV reports, URA Annual Revenue Performance Reports, World Bank Uganda Economic Updates.
What the repo actually ships
uganda_fiscal_data.csv, built from MoFPED budget speeches and IMF country pages, 2000-2024.
Key assumption to hold in mind
Shock distributions are calibrated from historical volatility, which assumes the next five years carry the same risk profile as the last 25.
References
Blanchard (1990), OECD Working Paper 79; IMF (2023) Uganda Article IV Consultation, Country Report 23/249; MoFPED (2024), Background to the Budget 2024/25.
Method
Scenario simulation across three oil-price paths, including Dutch Disease risk channels.
What it does
Models the interaction between petroleum revenue, the existing non-oil fiscal position and macroeconomic stability as Uganda's oil production comes online, under low, central and high price scenarios.
Designed to run on
World Bank Commodity Price API (Brent crude), IMF World Economic Outlook commodity price forecasts.
What the repo actually ships
No keyless live Brent crude feed was available for this site's own full page, so it doesn't reproduce the three-price-path scenario. Instead it calls the IMF World Economic Outlook API live for Uganda's real debt, current-account and growth trajectory, including the IMF's own forecast years, the existing fiscal position the catalogue entry's method actually models oil revenue against.
Key assumption to hold in mind
Production volumes and start dates follow publicly announced project timelines, which have already shifted more than once.
References
IMF World Economic Outlook database (SDMX 3.0 API).
Method
PEFA 2016 PI-1 (aggregate expenditure outturn) and PI-2 (expenditure composition outturn) indicator scoring.
What it does
Computes the percentage deviation of actual primary expenditure from the originally approved budget, and how that deviation is distributed across spending categories, the standard international measure of budget credibility.
Designed to run on
MoFPED IFMIS / UGATsDB, UBOS, World Bank WDI, EMIS, JMP.
What the repo actually ships
Sample budget tables structured to the PEFA 2016 methodology.
Key assumption to hold in mind
PEFA scoring assumes approved-budget figures are themselves a meaningful baseline, which can mask in-year reallocations made through supplementary budgets.
References
PEFA Secretariat (2016), Public Expenditure and Financial Accountability Framework.
Compliance, risk & behaviour
Where revenue leaks between the law and the payment: by sector, by district, by taxpayer, and by what people actually believe about paying tax.
Method
Published counts from the URA and UNU-WIDER technical note, checked against URA's own register. No model.
What it does
Charts registrations against firms using EFRIS each year, and each platform's share of users and invoices.
Designed to run on
URA EFRIS transaction and filing data, which a leakage model would need and which this site does not have.
What the repo actually ships
Published aggregates: WIDER Technical Note 2026/4, Tables 1 and 2.
Key assumption to hold in mind
Adoption is not compliance: a firm can invoice through EFRIS and still under-declare.
References
Lees, Jouste, Kalyowa, Musoke and Okello (2026), WIDER Technical Note 2026/4.
Method
A rules engine over a statutory library (obligations, schedule rates and penalty rules, each quoted and paged), ISO 31000 likelihood by impact scoring with control effectiveness, expected exposure from Uganda's penalty and interest rules, and maturity on the OECD tax control framework's six building blocks and five levels, with HMRC BRR+ and ATO board and managerial lenses.
What it does
Builds a living tax CRMP: the obligations register, heat map, exposure by tax head, maturity radar, compliance calendar with .ics export, RACI, ranked action plan, the law and schedules with their amendments, and a printable board report with GRI 207 drafts.
Designed to run on
Finance and tax teams of companies operating in Uganda, from SMEs to multinational subsidiaries.
What the repo actually ships
Real law: Uganda's consolidated tax statutes and the amendment register to FY2026/27. Three worked company examples are invented and labelled.
Key assumption to hold in mind
Ratings and exposures are a management estimate from the company's own answers and adjustable assumptions; they do not replace advice on the company's facts.
References
OECD Co-operative Tax Compliance: Building Better Tax Control Frameworks (2016); ISO 31000:2018; ISO 37301:2021; COSO 2013; ATO Tax risk management and governance review guide (2022); HMRC BRR+; IFRIC 23; GRI 207 (2019).
Method
Supervised risk scoring pipeline: data ingestion, feature engineering, model training, scoring and reporting, run as four sequential R scripts.
What it does
Builds bilateral mirror-trade features (declared Uganda trade values versus the partner country's own reported figures) and feeds them into a trained risk model that ranks CIT filers for audit prioritisation.
Designed to run on
UN Comtrade bilateral mirror trade data, Uganda CIT filings.
What the repo actually ships
data/sample_comtrade.csv, a structurally realistic but illustrative file. This site's own full page rebuilds part of the prototype's own companion reference file (headline corporate tax rate and Uganda DTA status, real and sourced for 19 jurisdictions; secrecy rank omitted, since it can't be verified here) and gives you a calculator for the mirror-trade gap and composite score on numbers you enter.
Key assumption to hold in mind
Mirror-trade gaps are a risk signal, not proof of mispricing; legitimate reasons (freight, insurance, timing) explain part of every gap.
References
UN Comtrade International Trade Statistics Database. A companion reference file, tax haven risk scoring.csv, scores 20-plus partner jurisdictions by secrecy rank, headline corporate rate and treaty status with Uganda.
Method
Structural Equation Modelling (SEM), via the lavaan R package.
What it does
Fits a latent-variable model of the chain perceived corruption, then institutional trust, then tax morale, then voluntary compliance, then revenue buoyancy, using household survey waves alongside administrative compliance data.
Designed to run on
Afrobarometer survey waves 3-9 (2005-2023), UGATsDB voluntary-compliance revenue data by district/sector/year, World Bank Worldwide Governance Indicators.
What the repo actually ships
This site's own full page calls the World Bank Worldwide Governance Indicators live, and cites real, specifically sourced Afrobarometer dispatch findings (AD1127, PP89). The UGATsDB voluntary-compliance panel the full SEM needs isn't available here, so the model's final links aren't fitted or reproduced.
Key assumption to hold in mind
SEM path coefficients express correlation structure consistent with the proposed causal chain, not a randomised test of causation.
References
Kirchler (2007), The Economic Psychology of Tax Behaviour; Luttmer & Singhal (2014), Journal of Economic Perspectives 28(4); Afrobarometer AD1127 (2026) and PP89 (2023); World Bank Worldwide Governance Indicators.
Method
Multi-Criteria Decision-Making (MCDM) ranking across population, employment, enterprise counts and existing licence compliance.
What it does
Combines district-level population, labour-force, enterprise and licensing data into a single formalisation-priority ranking, intended as a sequencing plan for expanding the tax net district by district.
Designed to run on
UBOS District Survey, KCCA Licensing Database, UGATsDB.
What the repo actually ships
No district-level source in this site's own live API kit publishes Uganda district microdata, so this site's own full page doesn't rebuild a synthetic district ranking. Instead it calls the World Bank live for Uganda's real national employment composition (self-employment, vulnerable employment, wage work), the backdrop a real district ranking would sit inside.
Key assumption to hold in mind
Because the underlying district figures are illustrative, this entry's ranking should be read as a demonstration of the method, not as a real prioritisation of Uganda's districts.
References
World Bank, ILO-modelled employment estimates.
International & cross-border tax
Where Uganda's own numbers stop being enough: offshore residency, transfer pricing, trade mispricing, and the Pillar Two rules large multinationals now face.
Method
Direct implementation of the GloBE ETR formula (covered taxes divided by GloBE income, by jurisdiction), calibrated to Uganda and the East African Community.
What it does
Calculates jurisdictional effective tax rates for a multinational group and flags where top-up tax would be owed under the 15% global minimum, for groups and jurisdictions operating in or alongside Uganda.
Designed to run on
OECD Country-by-Country Reporting (CbCR) aggregate statistics.
What the repo actually ships
data/sample_cbcr.csv, pending direct replacement with the official OECD CbCR API output. This site's own full page adds real global context ahead of the calculator: profit-shifting and minimum-tax-loophole figures from the EU Tax Observatory's Global Tax Evasion Report 2024.
Key assumption to hold in mind
CbCR aggregate statistics are jurisdiction-level, not firm-level, so results approximate rather than replicate an actual GloBE filing.
References
OECD (2021), Tax Challenges Arising from the Digitalisation of the Economy - Global Anti-Base Erosion Model Rules (Pillar Two); OECD CbCR Table I statistics; EU Tax Observatory, Global Tax Evasion Report 2024 (Zucman et al., 2023).
Method
Mirror-trade gap analysis and profit-shifting indicators drawn from international trade and investment statistics.
What it does
Compares East African countries' reported trade values against partner-country mirror statistics to flag likely mispricing, and estimates the associated corporate tax revenue at risk.
Designed to run on
UN Comtrade, World Bank (GDP, tariff and economic indicators), OECD (transfer pricing guidelines and CbCR aggregates), IMF Coordinated Direct Investment Survey, UNCTAD World Investment Report.
What the repo actually ships
No bundled file: this site's own full page calls UN Comtrade, WITS and UNCTADstat live, server-side, each time it's requested. The mirror-trade gap per partner is two independent live Comtrade calls -- Uganda's own declared value and the partner's own declared value -- not a stored or synthetic figure.
Key assumption to hold in mind
Mirror-trade and investment-flow gaps are risk indicators; they do not by themselves establish that mispricing occurred.
References
UN Comtrade; WITS (World Bank/UNCTAD/WTO); UNCTADstat.
Method
Bayesian tax-residency classification plus eight further modules covering EOI enforcement targeting, CARF readiness and VDP decision support.
What it does
Estimates the posterior probability that a given taxpayer is Uganda tax-resident under Income Tax Act (Cap 340) s.10, encoding the statutory 183-day rule, the 122-day three-year average test and the permanent-home test, then extends into exchange-of-information targeting and offshore tax-gap estimation.
Designed to run on
URA taxpayer records, OECD Common Reporting Standard / Common Approach to Reporting Framework (CARF) exchange-of-information data.
What the repo actually ships
This site's own full page implements the one layer that's fully real without needing taxpayer data: the statutory residency test itself (Income Tax Act Cap 340 s.10's three tests), live against whatever days-present figures you enter. The Bayesian posterior layer and the other eight modules need real URA taxpayer records and CRS/CARF data this repo doesn't have.
Key assumption to hold in mind
A posterior residency probability is a prioritisation signal for URA review, not a legal determination of residency status.
References
Income Tax Act (Cap 340), s.10; OECD Common Reporting Standard; OECD Crypto-Asset Reporting Framework (CARF).
Policy design & simulation
What happens if a specific rule changes: a presumptive tax band, an exemption, a fund structure, before it changes for real.
Method
Constrained revenue-maximisation subject to a political compliance-burden tolerance, statutory rate bounds and monotone band thresholds.
What it does
Jointly optimises the turnover breakpoints, the rate applied within each of five bands, and differential multipliers across seven business sectors for small businesses under Income Tax Act Cap 340 (turnover up to UGX 150 million), subject to a user-set ceiling on how much the burden on taxpayers can rise.
Designed to run on
URA presumptive-tax filing and revenue data by band and sector.
What the repo actually ships
sample_ubos.csv, 15,000 rows structured to mimic the UBOS Business Register (sector, district, turnover, compliance cost), explicitly sample data, not a real UBOS extract.
Key assumption to hold in mind
The compliance-burden tolerance is a political parameter the user sets, not an empirically estimated behavioural response.
References
Income Tax Act, Cap 340 (presumptive tax provisions).
Method
Cost-benefit scoring of each named exemption against the employment and FDI outcomes it is meant to support.
What it does
Scores Uganda's tax-expenditure portfolio (exemptions, holidays and reliefs) for FY2023/24 against the revenue forgone, and simulates the fiscal impact of removing the exemptions that score worst.
Designed to run on
MoFPED tax-expenditure statements, World Bank WDI (employment), World Bank / Uganda Investment Authority FDI data.
What the repo actually ships
tax_expenditures.csv, employment.csv and fdi.csv: 30 named exemptions and 15 sectors structured to mimic MoFPED/WDI statements, explicitly sample/placeholder figures.
Key assumption to hold in mind
Attributing employment or investment outcomes to a specific exemption, rather than to the general investment climate, is the central and hardest-to-verify step in any tax-expenditure cost-benefit exercise.
References
MoFPED Tax Expenditure Statements (budget.go.ug); World Bank World Development Indicators; Uganda Investment Authority.
Method
Scenario-based fund-waterfall modelling: six-scenario IRR/MOIC comparison, LP/LLP/SPV/hybrid structure comparison, and withholding-tax optimisation across Uganda's double tax agreements.
What it does
Models fund-level tax outcomes under Uganda's FSD Uganda / Capital Markets Authority Guidance Note 1 (2024-25 reforms), comparing legal structures and treaty routes for withholding-tax efficiency.
Designed to run on
FSD Uganda / Capital Markets Authority Guidance Note 1; Uganda's double tax agreements.
What the repo actually ships
This site's own full page implements the real, standard whole-fund distribution waterfall (return of capital, preferred return, GP catch-up, carry split) as a live calculator over your own fund parameters, no real Uganda fund's figures are used, paired with real, sourced Uganda withholding tax rates on outbound distributions.
Key assumption to hold in mind
Treaty benefit comparisons assume full entitlement under each DTA's limitation-on-benefits terms, which a real fund structure would need its own legal opinion to confirm.
References
FSD Uganda / Capital Markets Authority, Guidance Note 1 (2024-25 Reforms); PwC Uganda, Corporate - Withholding taxes.
Method
Exact legal arithmetic on any schedule, tested at every band edge; a grouped revenue model of URA's FY2014/15 PAYE groups scaled to a stated base; behavioural ranges from the published elasticity of taxable income for Uganda; reconciliation against the World Bank's UGAMOD results and the Budget Speech's figure.
What it does
Puts 100 pay packets, each 1% of monthly PAYE returns, under an editable staircase of tax bands. Reports mechanical, behavioural and net effects separately, the income where tax starts to rise, and a pay slip for any income. No option is ranked.
Designed to run on
URA's current PAYE returns by income band, which only URA holds.
What the repo actually ships
Published aggregates only: PAYE groups to FY2014/15, totals to FY2022/23, collections to FY2024/25.
Key assumption to hold in mind
The shape of pay is held at FY2014/15 and scaled to each base, because no later band table is published. Elasticities measured at the top 1% are assumed to apply lower down.
References
World Bank, Uganda Economic Update 25 (2025); Jouste et al., WIDER WP 2023/66; UGAMOD v2.1; URA Annual Data Book FY2024/25; Income Tax (Amendment) Act 2026.
Illicit financial flows
Money and goods that cross borders out of sight of the tax system: how to measure them, what they cost, and what the draft UN Tax Convention would and would not let administrations do about them.
Method
UNCTAD PCM+ mirror-trade asymmetry (CIF/FOB and re-export adjustments, UNCTAD-UNODC sign convention), difference-in-differences across the three digital tax stamp phases with placebo tests, a cigarette market identity (P + I = C + E + S + L), and an IFF country risk assessment (likelihood x impact).
What it does
Shows how large the recorded and unrecorded gaps are for stamped goods, whether stamping changed them, how much of the gap each reading of Article 3(2) would count as a tax-related illicit financial flow, and how much could be verified against fiscal marks under Article 11.
Designed to run on
UN Comtrade mirror statistics for Uganda and seven neighbours, WHO Global Health Observatory tobacco indicators, World Bank population and exchange rates, and URA digital tax stamp, excise and enforcement records.
What the repo actually ships
Real data throughout: 1,901 Comtrade records (2015 to 2025, nine stamped goods and two unstamped controls), WHO tobacco tax, price, prevalence and fiscal-marking indicators, World Bank series, and URA Data Book sheets, cached by a reproducible pull script. Daily cigarette consumption per smoker is the one reader-set input, because no confirmable source was found.
Key assumption to hold in mind
A mirror asymmetry is a signal for audit, not proof of illicit intent; timing, classification, transit and recording error produce gaps too.
References
UNCTAD and UNODC (2020), Conceptual Framework for the Statistical Measurement of Illicit Financial Flows; UNCTAD PCM+ methodology; UNODC ICCS 08041 and 08044; zero draft of the UN Framework Convention on International Tax Cooperation (A/AC.298/CRP.32).
Method
Rule-based reconciliation of declared exports against recorded arrivals (weight first, value net of a CIF-FOB margin otherwise; tolerance, materiality and producer-count suppression), revenue at stake as a lower, central and upper range at Uganda's effective excise rates, an audit ranking by unmatched value and persistence, and a blinded-lookup demonstration of private stamp authentication that catches forged, moved and cloned stamps.
What it does
Sorts every destination, product and year into matched, shortfall, no arrival record, excess arrival or data gap under rules the reader can change, values what the unmatched exports carry in Ugandan excise, and shows how a neighbour could check a stamp without seeing the register.
Designed to run on
Monthly export and arrival aggregates exchanged between competent authorities under MAAC Article 6; demonstrated here on annual UN Comtrade statistics.
What the repo actually ships
Real data: the paper's UN Comtrade download for eight stamped HS headings, 2015 to 2025, and URA Research Lab category-month excise aggregates for the effective rates. The stamp check uses synthetic codes and says so.
Key assumption to hold in mind
A notice points an audit at a flow; it is not a finding against anyone. Annual trade statistics carry timing, re-export and reporting noise that monthly administrative records would remove.
References
UN Comtrade; URA Research Lab released excise aggregates; RFC 3526 (MODP group 14); zero draft of the UN Framework Convention on International Tax Cooperation (A/AC.298/CRP.32).
How these were rebuilt, not just catalogued
14 of the projects above began as full R Shiny applications, a different runtime than this site, so none is ported over wholesale. All 18 entries now have a full interactive page here, each one rebuilt from whatever real, named data its own prototype could actually supply, live API calls where a genuine live source exists, real published figures where it doesn't, and the underlying statutory formulas implemented directly where the law itself is the real thing to get right. Where a prototype's own data (a sample file, a synthetic panel, a taxpayer record this site has no business inventing) couldn't be made real, that layer stays clearly separate and labelled illustrative rather than blended in as if it were a finding. A prototype that runs on illustrative numbers is still useful for testing a method; it just isn't yet a finding about Uganda, and every page here says so rather than leaving it to be assumed.